[閒聊] t

看板FJU-Stat97A作者 (最強一行文)時間16年前 (2009/10/01 16:11), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串1/1
#include <stdio.h> #include <stdlib.h> /* 統資二甲 497761326 林政漢 */ int main(void) { int height; double bmi; double weight; 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); } /* printf scanf 整數 int %d %d 小數 double (float) %f %lf 字元 char %c %c */ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.136.162.154

10/02 01:05, , 1F
大決
10/02 01:05, 1F

10/03 02:03, , 2F
第二堂
10/03 02:03, 2F
文章代碼(AID): #1An6HCJD (FJU-Stat97A)