Aktualizovat du5/program.c
This commit is contained in:
parent
ce24dc5c40
commit
9e1eb53d6a
@ -13,7 +13,7 @@ int main()
|
||||
char question[SIZE];
|
||||
char question2[SIZE];
|
||||
char answer = '0'; //'0' = ako keby 'NULL'/ absencia hodnoty
|
||||
int readLineNumber = 1;
|
||||
bool isFirstQuestionRead = false;
|
||||
bool isFirstOptionLoaded = false;
|
||||
bool err = false;
|
||||
|
||||
@ -43,16 +43,16 @@ int main()
|
||||
answer = line[0];
|
||||
break;
|
||||
}
|
||||
else if (readLineNumber == 1)
|
||||
else if (!isFirstQuestionRead)
|
||||
{
|
||||
sscanf(line, "%127[^\n]]", question);
|
||||
isFirstQuestionRead = true;
|
||||
// strcat(question, "?");
|
||||
}
|
||||
else
|
||||
{
|
||||
sscanf(line, "%127[^\n]]", question2);
|
||||
}
|
||||
readLineNumber += 1;
|
||||
}
|
||||
|
||||
if (answer == '0') { err = true; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user