program for following output using for loop?
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
Answer Posted / letskools
I think th correct program is this for the above output
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=0;i<=5;i++)
{
for(j=i;j<=5;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
What is 02d in c?
What is meant by initialization and how we initialize a variable?
What extern c means?
Explain what is meant by high-order and low-order bytes?
What is the difference between functions abs() and fabs()?
Explain the priority queues?
Calculate 1*2*3*____*n using recursive function??
Explain why can’t constant values be used to define an array’s initial size?
Explain the process of converting a Tree into a Binary Tree.
What is the stack in c?
Is c programming hard?
What is the purpose of 'register' keyword in c language?
What is the general form of function in c?
Explain the concept and use of type void.
What is the best way to comment out a section of code that contains comments?