Number Pattern 45-Pyramid pattern in C programming
Contents
hide
/>
In this program, we will see the Pyramid pattern numbers in C programming language. Please look into the program.
5 44 333 2222 11111
The C program for Pyramid pattern is as follows:
#include <stdio.h> int main() { int a, b, no_rows; printf("Enter number of rows - "); scanf("%d",&no_rows); for(a=no_rows;a>=1;a--) { for(b=5;b>=a;b--) { printf("%d",a); } printf("n"); } getch(); return 0; }