roberthsu2003 / cAndC-

48 stars 18 forks source link

蕭佩倛 #39

Closed peggypig950913 closed 5 months ago

peggypig950913 commented 5 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;
}