summaryrefslogtreecommitdiff
path: root/c/sw.c
blob: 9ddc567153df72abd3a80fb5d373e1918d5da9a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
#include <unistd.h>

int global_hours = 0;
int global_minutes = 0;
int global_seconds = 0;


int main() {
  for (int hours = 0; hours < 99; hours += 1) {
    for (int minutes = 0; minutes < 60; minutes += 1) {
      for (int seconds = 0; seconds < 60; seconds += 1) {
        sleep(1);
        global_seconds++;
        printf("%d:", global_hours);
        printf("%d:", global_minutes);
        printf("%d\n", global_seconds);
      }
      global_seconds = 0;
      global_minutes++;;
    }
    global_minutes = 0;
    global_hours++; 
  }
  return 0;
}