#40510: C++


1121228@stu.wghs.tp.edu.tw (七禮28林以和Harry)

學校 : 不指定學校
編號 : 266561
來源 : [60.248.154.139]
最後登入時間 :
2024-08-12 12:47:20
e343. BMI 計算 | From: [218.172.15.155] | 發表日期 : 2024-05-26 11:37

#include <iostream>
#include <cmath>
using namespace std;
int main() {
  int a;
  float b;
  cin >> a;
  cin >> b;
  float c = a / (b * b);
  printf("%.1f", c);  //四捨五入到十分位並印出
  return 0;
}

 
ZeroJudge Forum