From 7b21727285e50b0b050c4ddd70d07542229c5366 Mon Sep 17 00:00:00 2001 From: pants Date: Mon, 21 Sep 2026 14:17:03 -0700 Subject: init --- c/sw.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 c/sw.c (limited to 'c/sw.c') diff --git a/c/sw.c b/c/sw.c new file mode 100644 index 0000000..9ddc567 --- /dev/null +++ b/c/sw.c @@ -0,0 +1,27 @@ +#include +#include + +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; +} + -- cgit v1.2.3