Number Pattern 8 – Inverted full pyramid with numbers in C programming

Spread the love

Inverted full pyramid with numbers in C programming

Inverted full pyramid with numbers in C programming

In this program, we will see the inverted full pyramid with numbers in C programming language. Please look into the program.

123454321
 1234321
  12321
   121
    1

The C program for above Inverted Full pyramid using numbers is as follows:

#include <stdio.h>

int main()
{
    int a,b;
    int spaces=0;
    
   
    for(a=5; a>=1; a--)
    {
        
        for(b=1; b<=spaces; b++)
  {
   printf(" ");
  }
        
        for(b=1; b<=a; b++)
  {
   printf("%d",b);
  }
        
        for(b=a-1; b>=1; b--)
  {
   printf("%d",b);
  }
            
        printf("n");
        spaces++;
    }
 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