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