Aktualizovat „du5/program.c“
This commit is contained in:
parent
96a7241751
commit
d72315dc5d
@ -50,10 +50,13 @@ int main(){
|
|||||||
int flag=0;
|
int flag=0;
|
||||||
printf("Vysledok\n");
|
printf("Vysledok\n");
|
||||||
for(int i =0;i<c;i++){
|
for(int i =0;i<c;i++){
|
||||||
if(strcmp(PersonList[i]->name,PersonList[i+1]->name)!=0||flag==0){
|
if((strcmp(PersonList[i].name,PersonList[i+1].name)==0||strcmp(PersonList[i].name,PersonList[i+1].name)!=0)&&flag==0){
|
||||||
printf("%d %s\n",PersonList[i].score,PersonList[i].name);
|
printf("%d %s\n",PersonList[i].score,PersonList[i].name);
|
||||||
|
flag=1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
flag=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
free(PersonList);
|
free(PersonList);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user