08/10/18 22:31:24
>>449
#include<stdio.h>
double bmi(double weight, double height)
{
return weight / (height * height);
}
int main()
{
double weight, height;
printf("体重(kg)?");
scanf("%lf", &weight);
printf("身長(m)?");
scanf("%lf", &height);
printf("BMI=%g\n", bmi(weight, height));
return 0;
}