#include "stdafx.h" #include using namespace std; int main(int argc, char* argv[]) { int h, w; float s, va; cout << "請輸入身高及體重 : "; cin >> h >> w; s = h - 110; va = w/s; if (va > 1.1) cout << endl << "超過標準" << (w-s) << "公斤。" << endl; else if (va <= 1.1 && va >= 0.9) cout << endl << "低於標準" << (s-w) << "公斤。" << endl; else cout << endl << "標準體重" << endl; return 0; }