Arduino Projects    |   Raspberry Pi  |     Electronic Circuits   |   Electronics Reference Design Library  |   AVR    |    PIC    |    8051    |    Electronic Projects

Display a pattern of numbers

Code: 
/* Program display following Pattern  */
/* 1
   22
   333
   4444   */
#include<stdio.h>
#include<conio.h>
void main()
{
   int i,j,row;
   clrscr();
   printf("Enter How many Rows : ");
   scanf("%d",&row);
   for(i=1;i<=row;i++)
   {
for(j=1;j<=i;j++)
  printf("%2d",i);
printf("\n");
   }
   getch();
}
 
You are here