#include
#include
#include
void wait ( int seconds )
{
clock_t endwait;
endwait = clock () + seconds * CLK_TCK ;
while (clock() < endwait) {}
}
void main(){
int t,m,s;
printf("input counterdown time in seconds\n");
scanf("%d",&t);
printf("\n===================\n");
while(1)
{
wait ( 1 );
t--;
if (t==0) break;
s = t % 60;
m = t / 60;
printf("\r\t%02d:%02d",m,s);
}
exit(0);
};