Aktualizovat „du5/program.c“

This commit is contained in:
Bohdan Yanchyk 2020-04-09 23:22:43 +00:00
parent ca4f70c993
commit d50eb79d0f

View File

@ -65,7 +65,7 @@ int main(){
}
//int flag=0;
int flag=0;
qsort(PersonList,c,sizeof(struct person),comp_num);
int k =0;
@ -77,14 +77,19 @@ int main(){
PersonList[j] = PersonList[j+1];
PersonList[j+1]=temp;
c--;
flag=1;
for (int k=i; k<30; k++){
PersonList[k] = PersonList[k];
}
}
}
else{flag=0;}
}
}
if(flag ==1){
c=1;
}
printf("Vysledky:\n");
for(int i =0;i<c;i++){
printf("%d %s\n",PersonList[i].score,PersonList[i].name);