int main(){ time_t start, end
int i
start = time(NULL)
end = time(NULL)
printf("please input:")
for(i = 0i <3i++){
while(end - start <i){
end = time(NULL)
}
cystem("cls")
printf("%d", i)
}
return 0
}
#include <stdio.h>#include <stdlib.h>
#include <time.h>
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)
}