27 lines
327 B
C
27 lines
327 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main(void){
|
|
int x;
|
|
int i;
|
|
int j;
|
|
int maxj=1;
|
|
int maxj2=x/2-1;
|
|
|
|
printf("Hauteur ?: ");
|
|
scanf("%d",&x);
|
|
for(i=1;i<x;i++){
|
|
for(j=1;j<=x-i;j++){
|
|
printf(" ");
|
|
}
|
|
for(j=1;j<=maxj;j++){
|
|
printf("*");
|
|
}
|
|
printf("\n");
|
|
maxj+=2;
|
|
maxj2-=2;
|
|
}
|
|
|
|
|
|
return EXIT_SUCCESS;
|
|
} |