Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h> //printf() scanf()
- int main()
- {
- float bmi;
- float w;
- float h;
- printf("enter w in lbs: ");
- scanf("%f",&w);
- printf("enter h in inches: ");
- scanf("%f",&h);
- bmi = (w / (h * h) ) * 703;
- printf("your bmi is %f\n",bmi);
- if(bmi<=18.4)
- {
- printf("underweight\n");
- }
- if((bmi>18.4) && (bmi<25.0))
- {
- printf("normal\n");
- }
- if((bmi>=25) && (bmi<40.0))
- {
- printf("overweight\n");
- }
- if(bmi>=40.0)
- {
- printf("obese\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement