#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c,d;
printf("HOW MANY ROW PYRAMID YOU WANT\n\n");
scanf("%d" ,&c);
d=c;
for(a=1;a<=c;a++)
{
for(b=1;b<=d;b++)
printf(" ");
d--;
for(b=1;b<=2*a-1;b++)
printf("*");
printf("\n");
}
getch();
}
//output *
// ***
// *****
// *******
#include<conio.h>
void main()
{
clrscr();
int a,b,c,d;
printf("HOW MANY ROW PYRAMID YOU WANT\n\n");
scanf("%d" ,&c);
d=c;
for(a=1;a<=c;a++)
{
for(b=1;b<=d;b++)
printf(" ");
d--;
for(b=1;b<=2*a-1;b++)
printf("*");
printf("\n");
}
getch();
}
//output *
// ***
// *****
// *******
0 Comments
USE ANONYMOUS PROFILE IF YOU WANT D'NT SHARE EMAIL