// C Program print Pyramid Pattern
#include <stdio.h>

int main() 
{
    int N=5;

    // Outer loop for number of rows
    for(int i=1;i<=N;i++){
        // inner loop for space printing
        for(int j=1;j<=N-i;j++)
            printf(" ");
        // inner loop for star printing
        for(int j=1;j<2*i;j++)
            printf(" * ");
        printf("\n");
    }
return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: