作者antirazin (今年是日星來台年~真嗨)
看板TransCSI
標題[問題] 高雄大學94年計概
時間Fri Jun 22 14:16:04 2007
1.The first operational eletronic computer is:
(A)ENIAC (B)UNIVACI (C)IBM 650 (D)IBM 360
2.Which of these is not a component of a typical PC?
(A)Printer (B)Hard disk (C)Wand Scanner (d)Keyboard
(B)和(D)肯定不是~
3.見
http://www2.nuk.edu.tw/lib/exam/94/trans2/94cs(2)-trf.pdf
第27題.
我的解答:
#include <stdio.h>
int main(int argc, char *argv[])
{
int n,h,m,s,exit;
printf("Enter a number of seconds: ");
scanf("%d",&n);
h=n/3600;
m=n%3600/60;
s=n%3600%60;
printf("%d seconds are equal to %d hours ,
%d minutes, and %d seconds.\n",n,h,m,s);
/*printf("Press any key to continue\n");*/
/*scanf("%d\n",&exit);*/
system("pause");
return 0;
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.226.211.121
※ 編輯: antirazin 來自: 125.226.211.121 (06/22 14:46)
1F:推 abien:如果你碰過編譯軟體就不會這樣做了... 06/22 15:20
2F:推 ahongyeh:試看看 system("pause"); 06/22 17:46
3F:→ ahongyeh:忽然發現...你是我的對手.... >"< 06/22 17:48
4F:→ abien:樓上...XD 06/22 17:48
5F:→ abien:"Press any key to continue..."這行不用刻意打出來 會自動 06/22 17:49
6F:→ abien:產生 06/22 17:50
※ 編輯: antirazin 來自: 125.228.84.194 (06/23 10:05)
7F:推 antirazin:我加上去了...可是com過不了...抱歉我寫程式很爛>"< 06/23 10:05
8F:推 ahongyeh:主程式不要加參數~~(括號裡的東西都拿掉) 06/23 13:21
9F:→ ahongyeh:另外不要宣告exit~~最後也不用回傳值(return那行拿掉) 06/23 13:22
10F:→ ahongyeh:最後~~建議你把錯誤訊息PO出來~~不然不知道哪邊有問題~~ 06/23 13:23
11F:推 bilsted:好懷念阿 這是我考的那年XDD 06/24 00:23
12F:推 bilsted:不過這程式我complier 沒問題阿XD 06/24 00:29
13F:推 abien:語法沒錯不代表答案對阿XD 06/24 00:35
14F:推 abien:system("pause") 使用include<stdlib.h> 而且是print出 06/24 00:43
15F:→ abien:"請按任意鍵繼續..." 06/24 00:44
16F:推 antirazin:.....原來是<stdlib.h>和<stdio.h>啊....= = 06/24 09:17
17F:推 antirazin:送阿~~~~成功了XDDDDDDDDD 感謝各位大大相助 06/24 09:22
※ 編輯: antirazin 來自: 125.228.130.124 (06/24 09:24)