Closed peggypig950913 closed 6 months ago
#include <stdio.h> int main(void) { double Height,Weight,BMI; printf("請輸入身高(公分):"); scanf("%lf", &Height); printf("請輸入體重(公斤):"); scanf("%lf", &Weight); Height=Height/100; BMI=Weight/(Height*Height); printf("你的BMI:%.3lf\n",BMI); return 0; }