46 lines
790 B
C
46 lines
790 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int triangle(int hauteur, int n =1, int i, int etoile){
|
|
for (i = 0; i < hauteur; i++){
|
|
|
|
for(etoile = 0; etoile < n; etoile++){
|
|
printf("*");
|
|
}
|
|
|
|
n += 2;
|
|
printf("\n");
|
|
}
|
|
}
|
|
|
|
int carre(int coter = 0, int ecart, int a, int etoile){
|
|
|
|
for (a = 0, a < coter, a++){
|
|
pritnf("*");
|
|
}
|
|
|
|
for (a = 0, a < (coter - 2), a++){
|
|
printf("*");
|
|
|
|
for(ecart = 0, ecart < (coter - 2), ecart++){
|
|
pritnf(" ");
|
|
}
|
|
printf("*");
|
|
}
|
|
for (a = 0, a < coter, a++){
|
|
pritnf("*");
|
|
}
|
|
}
|
|
|
|
int menu(char choix){
|
|
pritnf("triangle : t\ncarre : c\nquitter : q\nenter votre choix : ");
|
|
scanf("%c", &choix);
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
int main(void){
|
|
|
|
|
|
|
|
} |