1#include<stdio.h>
2int main()
3{
4int i,j,n;
5printf("ENTER THE NUMBER OF ROWS YOU WANT TO PRINT * PYRAMID PATTERN\n");
6scanf("%d", &n);
7for(i = 1 ; i <= n ; i++)
8{
9 for (j = 1 ; j <= 2*n-1 ; j++)
10{
11 if (j >= n-(i-1) && j <= n+(i-1))
12 { printf("*"); }
13 else
14 {printf(" "); }
15}
16printf("\n");
17}
1#include <stdio.h>
2#define N 5
3int main()
4{
5 int i,j;
6 for(i=1;i<=N;i++)
7 {
8 for(j=1;j<=i;j++)
9 printf("*");
10
11 printf("\n");
12 }
13 return 0;
14}