DEV/DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/sapin.c
2022-10-04 17:58:52 +02:00

19 lines
282 B
C

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