26 lines
435 B
C
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;
|
||
|
}
|