From 23f90a3c2eef79353cfb33ea1cf635032f3e1ebf Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Fri, 10 Apr 2020 00:08:00 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Edu5/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du5/program.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/du5/program.c b/du5/program.c index 648537a..80a8791 100644 --- a/du5/program.c +++ b/du5/program.c @@ -38,7 +38,7 @@ int main(){ int score=0; int c =0; char str[100]; - while(fgets(str,100,stdin)!=EOF){ + while(fgets(str,100,stdin)!=0){ if(isalpha(str[0])!=0||str[0]=='\n'){ if(c==0){ printf("Nepodarilo nacitat nic\n"); @@ -95,7 +95,11 @@ int main(){ } } - + if(c==0){ + printf("Nepodarilo nacitat nic\n"); + return 0; + } + printf("Vysledky:\n"); for(int i =0;i