看板 FJU-Stat97A 關於我們 聯絡資訊
#include <stdio.h> #include <stdlib.h> int main(void) { int hour; //宣告彥數hour為整數資料型態。 int min; int sec; double total; printf("請輸入小時數:>",hour); scanf("%d",&hour); printf("請輸入分鐘數:>",min); scanf("%d",&min); printf("請輸入秒數:>",sec); scanf("%d",&sec); total=hour*3600+min*60+sec; printf("\t輸入的時間的總秒數是:>%9.2f\n",total); total=total*3; printf("\t輸入時間的總秒數是:>%9.2f\n",total); system("pause"); return(0); // int hour, min, sec; 這行宣告完全等於上面三行。 } -- 自私是來自面對現實的逃避。 http://www.wretch.cc/blog/killies -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.136.162.154
hipringles:地三堂140.136.162.140 10/08 15:54
a999999976:好像很用功... 114.36.169.6 10/08 17:27
terry0968:樓上是狗 樓下也是狗 61.57.151.55 10/08 20:46