diff options
Diffstat (limited to 'c/sw.c')
| -rw-r--r-- | c/sw.c | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -0,0 +1,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; +} + |
