how can i get output the following...
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1
and
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
plz plz...
Answer Posted / abhishek karnani
void main ()
{
int i,k,j;
clrscr();
for (i=0;i<5;i++)
{
for (j=5;j>=i+1;j--)
{
printf ("%d",j);
}
printf("\n");
for (k=0;k<j+1;k++)
{
printf(" ");
}
}
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Here is a neat trick for checking whether two strings are equal
What do you mean by dynamic memory allocation in c? What functions are used?
what are the advantages of a macro over a function?
What is main function in c?
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
What is the use of function in c?
Write a program on swapping (100, 50)
formula to convert 2500mmh2o into m3/hr
Is c is a high level language?
What is meant by preprocessor in c?
What is static volatile in c?
What is d scanf?
What is the meaning of c in c language?
Do you know the use of 'auto' keyword?
Define Spanning-Tree Protocol (STP)