你媳妇胖么?嘿嘿~
/** Copyright (c) 2013, 煙臺大學計算機學院
* All rights reserved.
* 作 者: 李家豪
* 完成日期:2013 年11月22日
* 版 本 號:v1.0
* 問題描述:你媳婦胖么
* 樣例輸入:162 50
* 樣例輸出:low
* 問題分析: 女性的標準體重是:身高(厘米)-100= 標準體重(公斤),超過標準體重20%以上者為肥胖,低于標準體重20%的為偏瘦,在肥胖與偏瘦之間為正常.。
*/#include <iostream>
#include<cstdio>
#include <iomanip>
using namespace std;
int main()
{int height,weight,st;cin>>height>>weight;st = height - 100;if(weight/st>1.2)cout<<"high\n";else if(weight/st<0.8)cout<<"low\n";elsecout<<"normal\n";return 0;
}
運行結果:
體會心得:哈哈,準不準呢,找幾個妹子是、測試下....
總結
- 上一篇: linux系统nc命令使用
- 下一篇: 关于 ConcurrentHashMap