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