#include<stdio.h>
void main(void)
{
float height,weight,BMI;
//get input
printf("\nPlease enter your height = ");
scanf("%f",&height);
printf("\nPlease enter your weight = ");
scanf("%f",&weight);
BMI = weight/(height*height);
printf("\n your BMI is = %f\n",BMI);
//condition
if (BMI > 24.00)
{
printf("You are too fat !!So you have to diet!!\n");
printf("Good luck!!\n");
}
scanf("%f",&weight);
}
Tiada ulasan:
Catat Ulasan