123
This commit is contained in:
parent
5086cdc191
commit
2ae393fdd1
@ -19,14 +19,14 @@ int main() {
|
|||||||
int max_students;
|
int max_students;
|
||||||
if (scanf("%d\n", &max_students) != 1 || max_students <= 0) {
|
if (scanf("%d\n", &max_students) != 1 || max_students <= 0) {
|
||||||
puts("Nespravny vstup");
|
puts("Nespravny vstup");
|
||||||
return 0; // Change this to return 0
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
char line[SIZE];
|
char line[SIZE];
|
||||||
while (fgets(line, SIZE, stdin) != NULL) {
|
while (fgets(line, SIZE, stdin) != NULL) {
|
||||||
line[strcspn(line, "\n")] = 0; // Remove the newline character
|
line[strcspn(line, "\n")] = 0;
|
||||||
int pocet_znakov = strlen(line) + 1; // Include the null terminator
|
int pocet_znakov = strlen(line) + 1;
|
||||||
if (pocet_znakov == 1) // Skip empty lines
|
if (pocet_znakov == 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Kontrola duplicít
|
// Kontrola duplicít
|
||||||
@ -46,7 +46,7 @@ int main() {
|
|||||||
|
|
||||||
if (pocet_mien_v_poli == 0) {
|
if (pocet_mien_v_poli == 0) {
|
||||||
puts("Ziadne prihlasky");
|
puts("Ziadne prihlasky");
|
||||||
return 0; // Change this to return 0
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Triedenie
|
// Triedenie
|
||||||
|
Loading…
Reference in New Issue
Block a user