From 8cfcf6956364a95ab6027a5f9dbe32da4037fa72 Mon Sep 17 00:00:00 2001 From: Yevhen Kozirovskyi Date: Thu, 17 Oct 2024 16:41:23 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20cv3/program.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv3/program.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cv3/program.c b/cv3/program.c index 1f1e19a..251026c 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -42,7 +42,7 @@ int main() { StEk stek; inicStEk(&stek); char bufer[256]; - while (fgets(bufer, sizeof(bufer), stdin)) { + while (fgets(bufer, sizeof(bufer), stdin) != NULL) { char* konec; double chislo = strtod(bufer, &konec); if (*konec == '\n' && *bufer != '\n' && *bufer != ' ') { @@ -104,5 +104,6 @@ int main() { } printf("\n"); } + printf("no input\n"); return 0; } \ No newline at end of file