24 lines
377 B
C
24 lines
377 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main(void){
|
|
int hauteur;
|
|
int i;
|
|
int a;
|
|
int b;
|
|
printf("Hauteur de l'arbre :");
|
|
scanf("%d", &hauteur);
|
|
int acc=hauteur-1;
|
|
for(i = hauteur ; i >= 0 ; i = i-1){
|
|
for(b = acc; b = 0; b = b-1){
|
|
printf(" ");
|
|
for(a = 0; a <= hauteur; a= a+1){
|
|
printf("*");
|
|
}
|
|
printf("\n");
|
|
}
|
|
}
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|
|
|