#include<stdio.h>
int main(void)
{
int n,i,j,k;
printf("input n=");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for (k=1;k<=i-1;k++)
printf(" ");
for (j=0;j<2*n+1-2*i;j++)
printf("*");
printf("\n");
}
return 0;
}
#include<stdio.h>
int main(void)
{
int n,i,j,k;
printf("input n=");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for (k=1;k<=i-1;k++)
printf(" ");
for (j=0;j<2*n+1-2*i;j++)
printf("*");
printf("\n");
}
return 0;
}