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
Can you write the function prototype, definition and mention the other requirements.
What is array of structure in c programming?
What is typedef struct in c?
What is the use of volatile?
What are the various types of control structures in programming?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
What is the usage of the pointer in c?
How can I swap two values without using a temporary?
What type of function is main ()?
How many keywords are there in c?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What is null pointer constant?
How do we make a global variable accessible across files? Explain the extern keyword?
What is sizeof c?
What is the value of uninitialized variable in c?