请帮我用c编个倒计时程序
来源:百度知道 编辑:UC知道 时间:2024/05/16 07:26:12
2.SetTimer();我不会用请讲讲
http://hi.baidu.com/ce_ken/blog/item/9957828ff54a10eff01f36cd.html
打字麻烦看看这个
#include <stdio.h>
#include <time.h>
int main()
{
int nSeconds;
printf("How long do you want to count(Seconds)? ");
scanf("%d",&nSeconds);
while(nSeconds >= 0)
{
printf("Now the count is: %d\n", nSeconds);
sleep(1);
nSeconds--;
}
return 1;
}
----------------------------------------
Test with TC2.0
________________________________________