这个是我写的:
#include
#include
#include
int main()
{
int a[4] = {0}, i;
clock_t ms, prev;
ms = CLOCKS_PER_SEC/67;
prev = clock();
printf("Press any key to start the timer...");
getch();
for(i = 0; i < 100; ++i)putchar('\b');
printf("Press ctrl+c to end the timer... \n");
while(1) {
if((clock() - prev) > ms) {
prev = clock();
++a[0];
}
printf("%02d:%02d:%02d:%02d", a[3], a[2], a[1], a[0]);
for(i = 0; i < 11; ++i)
putchar('\b');
for(i = 0; i < 4; )
if(a[i] == 60) {
a[i] = 0;
++a[++i];
} else break;
}
return 0;
}
如果是代码-->exe
编译就行了
如果你是说win界面
你可以用windows.h画
但我也白,不会
你还是百度吧
哈哈,这个不好实现,c是没有界面的,只能把c执行成.exe的文件