test
This commit is contained in:
parent
1fe4c745c4
commit
091df5dbdc
@ -9,7 +9,7 @@ int main() {
|
|||||||
scanf("%d", &maxStudents);
|
scanf("%d", &maxStudents);
|
||||||
|
|
||||||
if (maxStudents <= 0) {
|
if (maxStudents <= 0) {
|
||||||
printf("Nespravny vstup\n");
|
printf("Nespravny vstup");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,6 +24,11 @@ int main() {
|
|||||||
strcpy(names[numStudents], line);
|
strcpy(names[numStudents], line);
|
||||||
numStudents++;
|
numStudents++;
|
||||||
|
|
||||||
|
if (numStudents >= MAX_STUDENTS) {
|
||||||
|
printf("Príliš veľa študentov. Zvážte navýšenie MAX_STUDENTS.\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (numStudents == 0) {
|
if (numStudents == 0) {
|
||||||
printf("Ziadne prihlášky\n");
|
printf("Ziadne prihlášky\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user