From 0586d62120a7c0070f58691e928efa4ec011dc9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Vl=C4=8Dek?= Date: Tue, 14 Apr 2026 21:22:13 +0000 Subject: [PATCH] Aktualizovat du5/program.c --- du5/program.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/du5/program.c b/du5/program.c index 075168c..8cf1bff 100644 --- a/du5/program.c +++ b/du5/program.c @@ -14,8 +14,6 @@ int main() bool isFirstOptionLoaded = false; char answer = '0'; //'0' = ako keby 'NULL'/ absencia hodnoty bool err = 0; - int readingCurrentlyLine = 1; - int testnumber = 1; option1[0] = '\0'; option2[0] = '\0'; @@ -42,12 +40,11 @@ int main() answer = line[0]; break; } - else if (readingCurrentlyLine == 4) + else { - sscanf(line, "%127[^\n]", question); + sscanf(line, "%127[^?]", question); // strcat(question, "?"); } - readingCurrentlyLine += 1; } if (answer == '0') { err = true; }