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

Spread the love

Number Pattern 20-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.

N=39714

3 9 1 7 4
9 1 7 4
1 7 4
7 4
4

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

#include <stdio.h>

int main()
{
    long n = 39714, i=1;
 
    for(i=10;i<n;i*=10);

    for (i=i/10; n>0; i/=10)
    {
        printf("%dn", n);
        n%=i;
    }
 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