programming-examples/c/Pattern_Programs/P_1_22_333 Normal..c
2019-11-15 12:59:38 +01:00

38 lines
525 B
C

/* Pattern Problem
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
*/
#include <stdio.h>
#include <conio.h>
void main()
{
int i, j ;
clrscr() ;
printf("Required pattern is as follows: \n") ;
for(i=1 ; i<=5 ; i++)
{
/* Printing from left to Centre */
for(j=1 ; j<=i ; j++)
printf("%d ", i) ;
printf("\n") ;
}
getch();
}
/*
Output:
Required pattern is as follows:
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
*/