Number Pattern 18 – Inverted pyramid pattern of numbers in C programming

Spread the love

Number Pattern 18-Inverted pyramid pattern of numbers in C programming

Inverted pyramid pattern of numbers in C programming

In this program, we will see the inverted pyramid pattern or triangle of numbers in C programming language. Please look into the program.

1  2  3  4  5
6  7  8  9
10 11 12
13 14
15

The C program for Inverted pyramid pattern of numbers is as follows:

#include<stdio.h>

int main()
{
 int i,j,k,no_rows;
 k=1;
  
 printf("Enter number of rows - "); 
 scanf("%d",&no_rows);
  
  
 for(i=1;i<=no_rows;i++)
 {
  for(j=no_rows;j>=i;j--)
  {
   printf("%3d",k++);
  }
  printf("n");
 }
 getch();
 return 0;
}

Number Series Programs in C programmming

Star Pattern Programs in C programmming

Number Pattern Programs in C programmming

Alphabet Pattern Programs in C programmming


Spread the love

Leave a Comment