This commit is contained in:
Oleksandr Vyshniakov 2025-03-20 17:43:23 +01:00
parent d14dd3ead3
commit 206dd3e427

View File

@ -49,11 +49,7 @@ int main() {
continue; // Пропускаем ошибочную строку continue; // Пропускаем ошибочную строку
} }
int index = find_student(students, count, name); if (find_student(students, count, name) == -1) {
if (index != -1) {
students[index].golosa += golosa;
} else {
strcpy(students[count].name, name); strcpy(students[count].name, name);
students[count].golosa = golosa; students[count].golosa = golosa;
count++; count++;