Aktualizovat „du5/program.c“
This commit is contained in:
parent
943d605c48
commit
4917c58d10
@ -68,7 +68,12 @@ int main(){
|
||||
qsort(PersonList,c,sizeof(struct person),comp_num);
|
||||
printf("Vysledky:\n");
|
||||
for(int i =0;i<c;i++){
|
||||
res_strcmp = strcmp(PersonList[i].name,PersonList[i+1].name);
|
||||
if(i+1<c){
|
||||
res_strcmp = strcmp(PersonList[i].name,PersonList[i+1].name);
|
||||
}
|
||||
else{
|
||||
res_strcmp = strcmp(PersonList[i].name,PersonList[i-1].name);
|
||||
}
|
||||
if(res_strcmp!=0){
|
||||
flag=0;
|
||||
printf("%d %s\n",PersonList[i].score,PersonList[i].name);
|
||||
|
Loading…
Reference in New Issue
Block a user