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


Please Help Members By Posting Answers For Below Questions

What is the difference between c &c++?

641


Why array is used in c?

547


What is a program?

650


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

605


What is putchar() function?

627






What is huge pointer in c?

574


How we can insert comments in a c program?

620


string reverse using recursion

1803


How is null defined in c?

645


What are the applications of c language?

617


What is the difference between array_name and &array_name?

769


What is function pointer c?

581


What is the difference between abs() and fabs() functions?

599


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

1423


What is the sizeof () a pointer?

543