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 / deepti
#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 ? | 9 Yes | 1 No |
Post New Answer View All Answers
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
What is a scope resolution operator in c?
What is the method to save data in stack data structure type?
When should the volatile modifier be used?
What is volatile, register definition in C
Explain what are the __date__ and __time__ preprocessor commands?
Can include files be nested? How many levels deep can include files be nested?
What is a macro?
What are near, far and huge pointers?
What are the 5 data types?
How many types of operators are there in c?
What is the purpose of main() function?
Explain what is the difference between functions abs() and fabs()?
What is the use of parallelize in spark?
Why c is called top down?