program for following output using for loop?
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5

Answer Posted / atul shukla

#include<stdio.h>
void main()
{
int i,j;
for (i=1;i<=5;i++)
{
for(j=i;j<=5;j++)
printf("%d ",j);
printf("\n");
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I have seen function declarations that look like this

592


Write a program on swapping (100, 50)

634


Is Exception handling possible in c language?

1572


What is the purpose of sprintf?

611


What is difference between array and structure in c?

570






What is quick sort in c?

577


What do header files do?

595


write a program for the normal snake games find in most of the mobiles.

1781


Which is an example of a structural homology?

770


Why do we use c for the speed of light?

600


Explain what is wrong with this program statement? Void = 10;

761


What is #define used for in c?

609


What are high level languages like C and FORTRAN also known as?

675


How many parameters should a function have?

659


What are the three constants used in c?

538