This commit is contained in:
Rudolf Zambory 2025-03-21 12:19:37 +01:00
parent 9226e6f4a6
commit f7c0978ec3
2 changed files with 4 additions and 5 deletions

Binary file not shown.

View File

@ -7,14 +7,13 @@ int main() {
int studentCount = 0;
int aHlasy;
char aMeno[30];
char medzera;
int i;
while (scanf("%d", &aHlasy) == 1) {
scanf("%c", &medzera);
fgets(aMeno, 30, stdin);
aMeno[strlen(aMeno)-1] = '\0';
getchar();
fgets(aMeno, sizeof(aMeno), stdin);
aMeno[strcspn(aMeno, "\n")] = 0;
int i;
for (i = 0; i < studentCount; i++) {
if (strcmp(listM[i], aMeno) == 0) {
listH[i] += aHlasy;