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
What does *p++ do?
What is a structure in c language. how to initialise a structure in c?
Is fortran faster than c?
Explain the difference between the local variable and global variable in c?
What does the format %10.2 mean when included in a printf statement?
Give differences between - new and malloc() , delete and free() ?
What are data structures in c and how to use them?
What is default value of global variable in c?
If I have a char * variable pointing to the name of a function ..
How are 16- and 32-bit numbers stored?
How does pointer work in c?
What is character constants?
Who invented b language?
What is the difference between scanf and fscanf?
What is adt in c programming?