Theory
C program to print following Pyramid:
1
2 3
4 5 6
7 8 9 10
#includeint main() { int rows, i, j, number= 1; 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 ", number); number++; } printf("\n"); } return 0; }
From Pattern Printing in C · C programming
C program to print following Pyramid:
Program to print pyramid using numbers
C program to print following Pyramid:
Program to print full pyramid using *
C Program to print half pyramid a using numbers
C program to print following Pyramid:
C program to Print Pascal's triangle
Inverted full pyramid using *