Pattern 35: C Program to print number pattern using for loops
Print Number Pattern Programs:
Write a C Program to print below number pattern on the console:
Example 1:
Enter how many rows you want : 5
5
4 4
3 3 3
2 2 2 2
1 1 1 1 1
Example 2:
Enter how many rows you want : 10
10
9 9
8 8 8
7 7 7 7
6 6 6 6 6
5 5 5 5 5 5
4 4 4 4 4 4 4
3 3 3 3 3 3 3 3
2 2 2 2 2 2 2 2 2
1 1 1 1 1 1 1 1 1 1
Related Programs:
📢 Note: This program is one of the Series of Number pattern programs in C.
Program to print number pattern:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#include<stdio.h> int main() { int i,j,n; // Take input from the User printf("Enter how many rows you want : "); scanf("%d",&n); for(i=n; i>0; i--) { for(j=n; j>=i; j--) printf(" %d", i); printf("\n"); } return 0; } |
Program Output:
Similar Number Patterns:
- Come Together – 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
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