Code Box
-----------------------------------
/*program to print Number pattern square box by for loop
54321
54321
54321
54321
54321
*/
#include<stdio.h>
#include<conio.h>
void main()
{
int n,i,j;
clrscr();
printf("\nEnter a value: ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=n;j>=1;j--)
{
printf("%d",j);
}
printf("\n");
}
getch();
}
No comments:
Post a Comment