在Dos C 下运行的C语言程序怎样转变为windows C 程序

2025-04-26 04:04:17
推荐回答(3个)
回答1:

这个是我写的:

#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;
}

回答2:

如果是代码-->exe
编译就行了
如果你是说win界面
你可以用windows.h画
但我也白,不会
你还是百度吧

回答3:

哈哈,这个不好实现,c是没有界面的,只能把c执行成.exe的文件