Pattern 36: C Program Print Inverted Triangle Pattern ( Number Pattern )
Inverted Triangle Pattern :
Write a C Program to print below Inverted Triangle Pattern on the console using the for loops.
Here are the example outputs
Example 1:
Enter how many rows you want : 5
5 5 5 5 5
4 4 4 4
3 3 3
2 2
1
Example 2:
Enter how many rows you want : 9
9 9 9 9 9 9 9 9 9
8 8 8 8 8 8 8 8
7 7 7 7 7 7 7
6 6 6 6 6 6
5 5 5 5 5
4 4 4 4
3 3 3
2 2
1
📢 Note: This program is one of the Series of Number pattern programs in C.
Inverted Triangle Pattern Program:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#include<stdio.h> int main() { int i,j,n; printf("Enter how many rows you want : "); scanf("%d", &n); for(i=n; i>0; i--) { for(j=1; j<=i; j++) printf(" %d", i); printf("\n"); } return 0; } |
Program Output:
- The Collection of all Pattern Programs in C – SillyCodes
- Basic Number Pattern program.
- Triangle Number pattern using for loops.
- Number Pattern 3.
- C Program to print below pattern
- 5 4 3 2 1
5 4 3 2
5 4 3
5 4
5 - C Program to print below pattern.
- 1
2 3
4 5 6
7 8 9 10 - C Program to print Below Pattern,
- 5
4 5
3 4 5
2 3 4 5
1 2 3 4 5 - C Program to print below pattern.
- 1
2 1
3 2 1
4 3 2 1
5 4 3 2 1 - C Program to print below pattern.
- 5
5 4
5 4 3
5 4 3 2
5 4 3 2 1
- C Program to print below Number pattern.
- 1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
- C Program to print below Number pattern.
- 5
4 4
3 3 3
2 2 2 2
1 1 1 1 1
Similar Star pattern programs :
- Basic star pattern program (The square pattern with stars).
- Triangle star pattern program.
- Triangle star pattern program with Spaces.
- Pyramid star pattern.
- Reverse Pyramid program.
- Diamond Star pattern program.
- star pattern program.
- K-Star pattern program.
- Empty Rhombus program.
- X-Star pattern program
- More Star Patterns