diff --git a/cv5/program.c b/cv5/program.c index 558c607..f399320 100644 --- a/cv5/program.c +++ b/cv5/program.c @@ -60,9 +60,10 @@ int main() { struct Student students[MAX_STUDENTS]; int count = read_and_sum_votes(students, MAX_STUDENTS); + // Ak neexistujú žiadne údaje, vypíšeme chybovú správu if (count == 0) { printf("Nepodarilo nacitat nic\n"); - return 1; + return 0; } // Triedenie študentov