From 9ba7e835b9eac2838ff128897c8d18a1580a2316 Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Sun, 15 Mar 2020 18:28:00 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Ea1/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a1/program.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/a1/program.c b/a1/program.c index ed2774d..20f503e 100644 --- a/a1/program.c +++ b/a1/program.c @@ -14,7 +14,11 @@ int main() return 0; } long double r =0; - while((r=scanf("%Lf",&value)!=EOF)){ + while(1){ + r = scanf("%Lf",&value); + if (r==EOF){ + break; + } if(r!=1){ break; }