pattern 33: C Program to print the below number pattern using the 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  
5 4
5 4 3
5 4 3 2
5 4 3 2 1  

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

Program to print number pattern:

  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=n;j>=i;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