Theory
C program to print following Pyramid:
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
Source Code
#includeint main() { int i,j,rows; printf("Enter number of rows:\n"); fflush(stdout); scanf("%d", &rows); for (i=1; i<=rows; ++i) { for (j=1; j<=i; ++j) { printf("%d ",j); } printf("\n"); } return 0; }
From Pattern Printing in C · C programming
C program to print following Pyramid:
Program to print full pyramid using *
C program to print following Pyramid:
Program to print pyramid using numbers
C Program to Print Floyd's Triangle.
C program to print following Pyramid:
Inverted full pyramid using *
C program to Print Pascal's triangle