Theory
Program to print pyramid using numbers
*****
****
***
**
*
#includeint main() { int i,j,n; printf("Enter the number of rows:\n"); scanf("%d",&n); for(i=n-1; i>=0; i--) { for(j=0;j<=i;j++) { printf("*"); } printf("\n"); } return 0; }
From Pattern Printing in C · C programming
Program to print pyramid using numbers
C program to print following Pyramid:
Write a program in C to generate following pattern using unformatted input/output functions only.
C program to print following Pyramid:
Inverted full pyramid using *
Program to print full pyramid using *
C program to print following Pyramid:
C program to Print Pascal's triangle