Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- float hei;
- char sex;
- printf("Entre com o sexo do individuo : (H/M)\n"); sex = getche();
- printf("\nEntre com a sua altura : \n"); scanf("%f",&hei);
- if (sex == 'H')
- {
- printf("Peso ideal = %f\n",(72.7*hei)-58);
- }
- else if (sex == 'M')
- {
- printf("Peso ideal = %f\n",(62.1*hei)-44.7);
- }
- else printf("SEXO INEXISTENTE (hue)\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment