This commit is contained in:
Zoltán Szabó 2020-04-10 09:48:05 +02:00
parent 60bcf90200
commit dae6e68199

View File

@ -70,9 +70,14 @@ int main(int argc, char const *argv[]){
qsort(databaza, size, sizeof(struct student), compare_votes); qsort(databaza, size, sizeof(struct student), compare_votes);
printf("Vysledky:\n"); if(size==0){
for(int i=0; i<size; i++){ printf("Nepodarilo nacitat nic\n");
printf("%d %s\n", databaza[i].votes, databaza[i].name); }
else{
printf("Vysledky:\n");
for(int i=0; i<size; i++){
printf("%d %s\n", databaza[i].votes, databaza[i].name);
}
} }
return 0; return 0;
} }