题解 | #计算体重指数#
计算体重指数
https://ac.nowcoder.com/acm/problem/21460
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main()
{
float weight=0;
float height=0;
cin>>weight>>height;
float h=height/100;
float BMI=weight/pow(h,2);
cout<<fixed<<setprecision(2)<<BMI;
return 0;
}