#include <stdio.h>
#include <windows.h>
#include <stdlib.h>
int main()
{
int t=0;
printf("2:00\n");
Sleep(1000);
do{
t+=1;
if(t==120){
printf("0:00\n");
break;
}
int _t=-1*(t-120);
if(_t<60){
printf("0:%d\n",_t);
}else if(_t==120){
printf("0:00\nTime over\n");
break;
}else {
printf("1:%d\n",_t%60);
}
Sleep(1000); //一秒后继续报时
}while(1);
system("pause");
return 0;
} |