Number Pattern 21-Pyramid pattern of numbers in C programming
In this program, we will see the pyramid pattern or triangle of numbers in C programming language. Please look into the program.
5 45 345 2345 12345
The C program for pyramid pattern of numbers is as follows:
#include <stdio.h> int main() { int i, j, no_rows; printf("Enter number of rows - "); scanf("%d",&no_rows); for(i=no_rows;i>=1;i--) { for(j=i;j<=no_rows;j++) { printf("%d",j); } printf("n"); } getch(); return 0; }