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"); }