Code In Tech - The Ultimate World of Computer Technology

Sunday 22 April 2012

C program to print following pattern of numbers

                                1
                                12
                                123
                                1234
                                12345
SOURCE CODE: 
#include<stdio.h>
#include<conio.h>
void main();
{
 int i,j;
 clrscr();
 for(i=1;i<=5;i++)
 {
  for(j=1;j<=i;j++)
  {
  
printf("%d",j);
   printf("\n");
 }
getch();
}       

No comments :

Post a Comment