/*
* 文件名称:wueryong
* 作 者: 吴二用
* 完成日期:2016 年3 月 24日
* 版 本 号:v1.0
* 对任务及求解方法的描述部分:
* 输入描述: weight height
* 问题描述: 判断体重是否正常
* 程序输出: 超重 超轻 正常
* 问题分析: 略
* 算法设计: 略
*/
#include <iostream>
using namespace std;
int main()
{
double height,weight,s;
cout<<"请输入体重="<<endl;
cin>>weight;
cout<<"请输入身高height="<<endl;
cin>>height;
s=height-100;
cout<<"标准体重="<<s<<endl;
if(weight>s*1.2)
cout<<"超重"<<endl;
if(weight<s*0.8)
cout<<"超轻"<<endl;
else
cout<<"正常"<<endl;
return 0;
}
体会:程序有点复杂,还不允许出错,需要专注,细致。