Saturday, May 6, 2023

find bmi for a human body

 // find bmi for a human body

#include "stdio.h"
int main (){
    float  h,w,b;
    printf ("Enter the height (in meter ) and weight (in kg ) for a person :\n");
    scanf ("%f%f",&h,&w);
     b=(float)w/(h*h);
    printf ("the bmi of the  man is : %f\n ",b);
    return 0;

}
output output output

Enter the height (in meter ) and weight (in kg ) for a person : 1.75 80 the bmi of the man is : 26.122450

No comments:

Post a Comment

print a multiplication table of any integer taking from user

 // print a multiplication table of any integer taking from user  #include "stdio.h" int main () { int n,mul,i; printf ("...