From 2bcce5a1917e2c9203bad7743c0d209950bf5668 Mon Sep 17 00:00:00 2001 From: Marat Izmailov Date: Thu, 17 Oct 2024 11:47:16 +0000 Subject: [PATCH] Update cv3/program.c --- cv3/program.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cv3/program.c b/cv3/program.c index 827bc7f..89825a6 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -46,6 +46,7 @@ int main() { int has_input = 0; while (1) { + if (!fgets(input, sizeof(input), stdin)) { break; } @@ -111,7 +112,9 @@ int main() { } - if (!has_input) { + if (has_input) { + printf("\n"); + } else { printf("no input\n"); }