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
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
What is the use of #define preprocessor in c?
To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
What are logical errors and how does it differ from syntax errors?
swap 2 numbers without using third variable?
What are the advantages and disadvantages of pointers?
What is function prototype?
Can main () be called recursively?
In C programming, what command or code can be used to determine if a number of odd or even?
Is int a keyword in c?
Tell me about low level programming languages.
What is the difference between array and pointer in c?
How do I get an accurate error status return from system on ms-dos?
What are all different types of pointers in c?
Is a house a mass structure?