Aktualizovat du5/program.c

This commit is contained in:
Tomáš Vlček 2026-04-14 21:23:57 +00:00
parent 0586d62120
commit 0a01598648

View File

@ -13,6 +13,7 @@ int main()
char question[SIZE]; char question[SIZE];
bool isFirstOptionLoaded = false; bool isFirstOptionLoaded = false;
char answer = '0'; //'0' = ako keby 'NULL'/ absencia hodnoty char answer = '0'; //'0' = ako keby 'NULL'/ absencia hodnoty
int readLineNumber = 1;`
bool err = 0; bool err = 0;
option1[0] = '\0'; option1[0] = '\0';
@ -40,11 +41,12 @@ int main()
answer = line[0]; answer = line[0];
break; break;
} }
else else if (readLineNumber == 1)
{ {
sscanf(line, "%127[^?]", question); sscanf(line, "%127[^?]", question);
// strcat(question, "?"); // strcat(question, "?");
} }
readLineNumber += 1;
} }
if (answer == '0') { err = true; } if (answer == '0') { err = true; }