Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- int main()
- {
- // Variabili
- int hh;
- int mm;
- int ss;
- // Iniziamo dall'alba
- hh = 0;
- mm = 0;
- ss = 0;
- // Un orologio va sempre...
- while (1) {
- while(hh < 24) {
- while(mm < 60) {
- while(ss < 60) {
- printf("%d : %d : %d \tClose with Ctrl+C\r", hh, mm, ss);
- fflush(stdout);
- sleep(1);
- ss++;
- }
- mm++;
- ss = 0;
- }
- hh++;
- mm = 0;
- }
- hh = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement