ADD file via upload

pull/1/head
pi2o8m7nv 3 years ago
parent 1233c52fe1
commit 96f108a63a

@ -0,0 +1,30 @@
#include <stdio.h>
int main()
{
int i,j,n;
scanf("%d",&n);
int k=(n+1)/2;
for(i=1;i<=k;i++){
for(j=1;j<=n-2*i+1;j++){
printf(" ");
}
for(j=1;j<=2*i-1;j++){
printf("* ");
}
printf("\n");
}
for(i=n-k;i>=1;i--){
for(j=1;j<=n-2*i+1;j++){
printf(" ");
}
for(j=1;j<=2*i-1;j++){
printf("* ");
}
printf("\n");
}
return 0;
}
Loading…
Cancel
Save