Aktualizovat a3/program.c

This commit is contained in:
Tomáš Vlček 2026-03-30 07:57:30 +00:00
parent 2e6a0cbd40
commit 8e19c7fbab

View File

@ -28,9 +28,9 @@ int main()
{ {
if (studentsAmount == 0) if (studentsAmount == 0)
{ {
if(sscanf(line, "%d", studentsAmount) == 1) { continue; } if(sscanf(line, "%d", &studentsAmount) == 1) { continue; }
} }
else if(sscanf(line, "%s", processedName) == 1) else if(sscanf(line, "%s", &processedName) == 1)
{ {
strcpy(student[i].meno, processedName); strcpy(student[i].meno, processedName);
strncat(student[i].meno, &newLineSymbol, 1); strncat(student[i].meno, &newLineSymbol, 1);