Code Box
-----------------------------------------
/*program to print Number pattern square box by do while 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);
do
{j=1;
do
{
printf("%d",j);
j++;
}
while(j<=n);
printf("\n");
i++;
}
while(i<=n);
getch();
}
No comments:
Post a Comment