Home > Back-end >  O bosses teach
O bosses teach

Time:04-23

Written in C language of a digital clock procedures, requires a second, points, carry,

CodePudding user response:

The console? A little bit of a problem

CodePudding user response:

Would run to 0 0 0 seconds automatically start

CodePudding user response:

Inside a loop, the output of time, and then wait for a second, update again

CodePudding user response:

 # include & lt; stdio.h> 
#include

Int main ()
{
Int the SEC, min, hou;
The SEC=min=hou=0;
While (1) {
System (" Cls ");
Printf (" % d % d % d seconds \ n ", hou, min, SEC);
Sleep (1000);
Sec++;
If (SEC==60) {
The SEC=0;
Min++;
}
If (min==60) {
Min=0;
Hou++;
}
}

return 0;
}



For your reference
  • Related