BC25 计算体重指数
#include<stdio.h>
/*
int main()
{
double BMI=0.0;
int high=0;
int weight=0;
scanf("%d %d",&weight,&high);
//cm->m
high=(float)high/100;
BMI=weight/(high*high);
printf("%.2lf",BMI);
return 0;
}
*/
int main()
{
double BMI=0.0;
int high=0;
int weight=0;
scanf("%d %d",&weight,&high);
//cm->m
BMI=weight/((double)high*high/10000);
printf("%.2lf\n",BMI);
return 0;
}
https://blog.51cto.com/u_15460718/4839513
页:
[1]