看板 FJU-Stat98A 關於我們 聯絡資訊
#include <stdio.h> #include <stdlib.h> /* 統資二甲 宅難56 */ int main(void) { int height; double bmi; double weight; printf("請輸入你的身高:>"); printf("請輸入你的身高:>"); scanf("%d",&height); printf("請輸入你的體重:>"); scanf("%lf",&weight); bmi = weight/((height/100.0)*(height/100.0)); printf("你bmi值是:>%f\n",bmi); system("pause"); return(0); } /* -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.136.164.139