Tell me a C program to display the following Output?
1 1 1 1 1
2 2 2 2
3 3 3
4 4
5
Answer Posted / devi
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=5;j>=i;j--)
{
printf("%d",i);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What do you mean by command line argument?
Where is c used?
What are the types of unary operators?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
What is the main difference between calloc () and malloc ()?
What are the different types of C instructions?
Why is sprintf unsafe?
What oops means?
What is spaghetti programming?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
What do you mean by dynamic memory allocation in c?
What is the purpose of main() function?
What is c language & why it is used?
What does c mean?
Is it possible to execute code even after the program exits the main() function?