杜牧恒


私信TA

用户名:dotcpp0687248

访问量:2552

签 名:

黄云万里动风色,白波九道流雪山

等  级
排  名 628
经  验 3995
参赛次数 14
文章发表 128
年  龄 99
在职情况 在职
学  校 大庆一中附属第一小学
专  业 你猜

  自我简介:

人类

#include <bits/stdc++.h>


using namespace std;


int main()

{

    double height,weight,bmi;

    cout << "体重(公斤):" ;

    cin>>weight;

    cout << "身高(米):" ;

    cin>>height;

    bmi=weight/(height*height);

    if(bmi<18.5)

    {

        cout<<"偏瘦";

    }

    else if(bmi<24)

    {

        cout<<"正常";

    }

    else if(bmi<28)

    {

        cout<<"偏胖";

    }

    else if(bmi<40)

    {

        cout<<"肥胖";

    }

    else

    {

        cout<<"极重度肥胖";

    }

    cout<<endl;

    system("pause");

    return 0;

}


 

0.0分

1 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区