问题标题:
C++,输入体重,身高,算bmi1.Askfortheuserforhisfirstname.输入你的姓名x09x09x09x09x09x09x09x09x09x09x09x09x092.Asktheuserwhetherhewantstousemetricorstandardsystem.选择哪种方式来计算x09x09x09x09x09
问题描述:
C++,输入体重,身高,算bmi
1.Askfortheuserforhisfirstname.输入你的姓名
x09x09x09x09
x09x09x09x09
x09x09x09x09x09
2.Asktheuserwhetherhewantstousemetricorstandardsystem.选择哪种方式来计算
x09x09x09x09
x09x09x09x09
x09x09x09x09x09
3.Basedonthechoiceofthesystem,prompttoaskweightandheight.Usetheanswer
x09x09x09x09x09
andtheappropriateformulatocalculatetheuser’sbmi.根据选择的方式输入体重和身高(磅和英尺,或千克和米)
x09x09x09
x09x09x09x09
x09x09x09x09x09
4.Printsouttotheuser(addressedwithhisname)whathisBMIis.输出,用户的姓名和bmi的值
x09x09x09x09
x09x09x09x09
x09x09x09x09x09
5.PrintsoutwhichcategoryofweighthebelongstodependingonhisBMI.输出,用户的姓名,和更具bmi的值用户的体重属于哪一类的.
BMI=weight(kg)/((height(m))(height(m))
BMI=weight(lb)/((height(in)(height(in))*703
x09x09x09
UnderweightifBMI
范存海回答:
#include <iostream>#include <string>#include <stdlib.h>using namespace std;class person {//新建人物类public: person();...
点击显示
其它推荐
热门其它推荐