I have been dealing with this program for a week now. and I am progressing very slowly. Then I have found this site to ask for help!!so i have come to find a solution, for a program that shows an analogical watch.
this is a code that shows a digital watch:
include <stdio.h>
include <stdlib.h>
include <time.h>
int main (void) {
time_t h, m, s;
time_t cur = time(NULL);
while (1) {
if ( time(NULL) > cur ) {
cur = time(NULL) % 86400;
h = cur / 3600;
m = (cur - h * 3600) / 60;
s = cur - h * 3600 - m * 60;
printf ("\b\b\b\b\b\b\b\b\b%02dh%02dm%02ds",h+1,m,s);
}
}
return EXIT_SUCCESS;
}
now I must transform it.
Do you have an idea?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been dealing with this program for a week now. and I am progressing very slowly. Then I have found this site to ask for help!!so i have come to find a solution, for a program that shows an analogical watch.
this is a code that shows a digital watch:
include <stdio.h>
include <stdlib.h>
include <time.h>
int main (void) {
time_t h, m, s;
time_t cur = time(NULL);
}
now I must transform it.
Do you have an idea?