VC 的 kbhit() 不能返回 鍵名。
23:59:59 -- 86400 秒
#include <stdio.h>
#include <windows.h>
#include <conio.h>
void main()
{
long int t;
int flag =0;
t = 86400;
printf("press S start, press E stop\n");
while(1)
{
if (kbhit() == 'S' || kbhit() == 's') flag =1;
if (kbhit() == 'E' || kbhit() == 'e') flag =0;
Sleep(1000);
if (flag == 1) t = t -1;
if (t <= 0) break;
printf("%d ",t);
}