diff options
| author | _ov4 <ov4@ov4.org> | 2026-08-12 12:33:58 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-08-12 12:33:58 +0000 |
| commit | 1caf88d333dd6a2b0aff719994dd6c47708c0c76 (patch) | |
| tree | 5cc4042a5b6d17fa0de66fb4452e53b140baac3a /output.c | |
| parent | c2d1c8f63504c5ca65c127d6dba4cd7e39399066 (diff) | |
helper
Diffstat (limited to 'output.c')
| -rw-r--r-- | output.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/output.c b/output.c new file mode 100644 index 0000000..bba2760 --- /dev/null +++ b/output.c @@ -0,0 +1,21 @@ +#include <stdio.h> +#include <unistd.h> +#include <stdlib.h> + +int main(int argc, char **argv) +{ + int i, secs; + + if (argc != 2) { + fprintf(stderr, "Usage: %s <n>\n", argv[0]); + exit(0); + } + secs = atoi(argv[1]); + for (i=0; i < secs; i++) + { + printf("%d\n", i); + fflush(stdout); + sleep(1); + } + exit(0); +} |
