题解 | #计算体重指数#

计算体重指数

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;
}
全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务