From f4d86929edbb0c6bde1ecd77b33777d9b425c4f3 Mon Sep 17 00:00:00 2001 From: Vladyslav Korzun Date: Thu, 23 Mar 2023 17:27:50 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'a1/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a1/program.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/a1/program.c b/a1/program.c index 38edcc0..177821b 100644 --- a/a1/program.c +++ b/a1/program.c @@ -20,7 +20,10 @@ int main() { if (feof(stdin)) { break; } - zaciatok_cisla = znaky; + if(znaky[0] == '\n'){ + break; + } + zaciatok_cisla = znaky; counter = 0; while (*zaciatok_cisla != '\0') { cislo = strtol(zaciatok_cisla, &koniec_cisla, 10); @@ -62,7 +65,6 @@ int main() { buffer[3] = 127; } puts(buffer); - } + } return 0; } -