Изменить 'du6/program.c'

This commit is contained in:
Pavlo Tverdyi 2020-04-16 14:59:30 +00:00
parent 8ce0eecee0
commit cba3a8eb0e

View File

@ -35,9 +35,7 @@ char keep(struct LIS* list,int places){
int count=0; int count=0;
char names[100]; char names[100];
for(;fgets(names,100,stdin);){ for(;fgets(names,100,stdin);){
for(int i=0; i<100;i++){ if(names[0]=='\n') continue;
if(names[i]=='\n') continue;
}
if(sscanf(names,"%s %s",list[count].fname,list[count].name)==2){ if(sscanf(names,"%s %s",list[count].fname,list[count].name)==2){
count++; count++;
if(places>=count){ if(places>=count){
@ -113,18 +111,4 @@ void print(struct LIS *list,int count,int places){
else{ else{
puts("Ziadne prihlasky"); puts("Ziadne prihlasky");
} }
} }