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
How can type-insensitive macros be created?
What is abstract data structure in c?
Explain what is the difference between #include and #include 'file' ?
What are the advantages of using macro in c language?
How is = symbol different from == symbol in c programming?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
Difference between linking and loading?
What is printf () in c?
What is bin sh c?
Should I learn data structures in c or python?
What is c method?
What's the right way to use errno?
Can you subtract pointers from each other? Why would you?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?