C Program to Print the Rectangular Pyramid Pattern of Special Characters !
C Program to Print the Rectangular Pyramid Pattern of Special Characters.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #include<stdio.h> int main() { int num, row, column; printf("\nEnter Number of Rows to be display : "); scanf("%d", &num); for (row = 1; num >= row; row++) { for (column = 1; column <= num; column++) { printf("# "); } printf("\n"); } return 0; } |
Output of the Program :
1 2 3 4 5 | Enter Number of Rows to be display : 4 # # # # # # # # # # # # # # # # |