1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| #include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int taille = 0;
int sexe = 0;
printf ("Est-tu un homme ou une femme ? Si tu est un homme, tape 0, sinon tape 1");
scanf("%d", &sexe);
if("sexe = 0");
{
printf ("Tu est un homme,tu mesures combien en cm ?");
scanf ("%d",&taille);
printf("Ah ! Tu mesure donc %d cm !\n\n", taille);
int PoidsIdealHomme = 0;
PoidsIdealHomme = taille - 100 - ((taille - 150)/4) ;
printf ("Ton Poids Ideal doit être de %d", PoidsIdealHomme) ;
}
if ("sexe = 1");
{
printf ("Tu est une femme, tu mesure combien cn cm ?");
scanf ("%d",&taille);
printf("Ah ! Tu mesure donc %d cm !\n\n", taille);
int PoidsIdealFemme = 0;
PoidsIdealFemme = taille -100 - ((taille - 150)/2.5);
printf ("Ton Poids Ideal doit être de %d", PoidsIdealFemme) ;
}
return 0;
} |
Partager