This commit is contained in:
Andrii Hermaniuk 2022-04-07 16:49:18 +02:00
parent 1332dbc534
commit 14855a54d4

View File

@ -43,14 +43,14 @@ int main(){
databaza[size].votes=value; databaza[size].votes=value;
size+=1; size+=1;
if(size>1){
//printf("=====================================\n");
qsort(databaza, size, sizeof(struct student), compare);
}
} }
else { else {
databaza[id].votes+=value; databaza[id].votes+=value;
} }
if(size>1){
//printf("=====================================\n");
qsort(databaza, size, sizeof(struct student), compare);
}
} }
printf("Vysledky:\n"); printf("Vysledky:\n");
for(int idx=0;databaza[idx].name[0]!='\0';idx++) for(int idx=0;databaza[idx].name[0]!='\0';idx++)