Pattern 36: C Program to print number pattern 13 using 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 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.

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.    for(i=n;i>0;i)
  13.    {
  14.       for(j=1;j<=i;j++)
  15.          printf(” %d”,i);
  16.       printf(n);
  17.    }
  18.    return 0;
  19. }

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