program for following output using for loop?
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
Answer Posted / rajarshi bhadra
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=5;i>=0;i--)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}
Is This Answer Correct ? | 4 Yes | 7 No |
Post New Answer View All Answers
What is the difference between c &c++?
Why array is used in c?
What is a program?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
What is putchar() function?
What is huge pointer in c?
How we can insert comments in a c program?
string reverse using recursion
How is null defined in c?
What are the applications of c language?
What is the difference between array_name and &array_name?
What is function pointer c?
What is the difference between abs() and fabs() functions?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
What is the sizeof () a pointer?