-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBMI.c
More file actions
25 lines (25 loc) · 579 Bytes
/
Copy pathBMI.c
File metadata and controls
25 lines (25 loc) · 579 Bytes
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
#include <stdio.h>
int main()
{
float weight;
printf("Enter your body weight\n");
scanf("%f",&weight);
printf("Enter your height in meters\n");
float height;
scanf("%f", &height);
float BMI;
BMI = weight / (height * height);
printf("Your BMI is %.2f\n", BMI);
if (BMI < 18.3) // These are fixed values
{
printf("You are under weight\n You need to join GYM");
}
else if (BMI < 24.9)
{
printf("Your weight is normal\nStay Healthy");
}
else
{
printf("You are overweight\nJoin GYM");
}
}