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

26 lines
435 B
C

#include <stdio.h>
#include <stdlib.h>
int main() {
char n;
int h;
int i;
int j;
int e;
int z=0;
while(z==0){
printf("_______________\nt) Triangle\nc) Carre\nq) Quitter\nVotre choix ? ");
scanf(" %c",&n);
if (n=='t'){
printf("Hauteur ? ");
scanf("%d",&h);
for (i=0;i<=h;i++){
for (j=h-i;j>0;j--){
} for (e=0;e<i;e++){
printf("*");
} printf("\n");
}
}
}
return 0;
}