Sunteți pe pagina 1din 1

Solution to Question No.

8 :
Program:
/* Program to accept the height and weight of aperson as inputs and print
the BMI */
#include<stdio.h>
void main()
{
float h,w,BMI;
clrscr();
printf("Enter the height(m) and weight(kg) of the person:");
scanf("%f %f",&h,&w);
BMI=w/(h*h);
printf("The BMI of the person is: %f kg/m^2",BMI);
getch();
}

S-ar putea să vă placă și