Pattern 31: C Program to print below number pattern using for loops

Spread the love

Write a C Program to print below number pattern on the console:

Enter how many rows you want : 5
 5
 4 5
 3 4 5
 2 3 4 5
 1 2 3 4 5

Note: This program is one of the Series of Number pattern programs in C.

Program :

  1. /*
  2.    C Program to print number pattern on Console
  3.    Author : Venkatesh Macha.
  4.    Website  : www.SillyCodes.com
  5. */
  6. #include<stdio.h>
  7. int main()
  8. {
  9.    int i,j,k,n;
  10.    printf(“Enter how many rows you want : “);
  11.    scanf(“%d”,&n);
  12.  
  13.    for(i=n;i>0;i)
  14.    {
  15.       for(j=i;j<=n;j++)
  16.          printf(” %d”,j);
  17.  
  18.       printf(n);
  19.    }
  20.    return 0;
  21. }

Output :

Similar Number Patterns:

Similar Star pattern programs :

Venkatesh Macha

Hi Guys, I am Venkatesh Macha. I am a programmer and an Open Source enthusiast, Presently working as a Software Engineer. Apart from that, I love to explore new technologies and things.

You may also like...

Leave a Reply