Zone for ultimate tech and study update
Advertisement
Write a program to print the following outputs using for loops:
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=5;i<=1;i--)
{
for(j=i;j<=1;j--)
printf(“%3d”,j);
printf(“\n”);
}
getch();
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1
}
Output::
No comments:
Post a Comment
Please comment bellow. Share your knowledge
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Please comment bellow. Share your knowledge