個人相片
BMI OuO
涵方 - 資研(白毛) 鄭發表於2014年 10月 27日(一.) 18:59
#include<iostream>
#include<cmath>
#include<cstdlib>

using namespace std;

int main()
{
    double height,weight,BMI;
    cout << "請輸入身高(cm):";
    cin >> height;
    cout << "請輸入體重(kg):";
    cin >> weight;
    BMI = weight / (( height / 100 ) * ( height / 100 ));
    cout << "BMI:" << BMI;
   
    system("pause");
    return 0;
}