Brijmohan lal Sahu - Facebook
Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Thursday, December 11, 2014

Program to print number pattern square box by do while loop in C.




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: