From cba3a8eb0e316c2d64f613b30327197b2235a672 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Thu, 16 Apr 2020 14:59:30 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'du6/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du6/program.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/du6/program.c b/du6/program.c index 1b2125a..08f0bc4 100644 --- a/du6/program.c +++ b/du6/program.c @@ -35,9 +35,7 @@ char keep(struct LIS* list,int places){ int count=0; char names[100]; for(;fgets(names,100,stdin);){ - for(int i=0; i<100;i++){ - if(names[i]=='\n') continue; - } + if(names[0]=='\n') continue; if(sscanf(names,"%s %s",list[count].fname,list[count].name)==2){ count++; if(places>=count){ @@ -113,18 +111,4 @@ void print(struct LIS *list,int count,int places){ else{ puts("Ziadne prihlasky"); } -} - - - - - - - - - - - - - - \ No newline at end of file +} \ No newline at end of file