This commit is contained in:
Jana Kapalková 2026-03-05 18:37:04 +01:00
parent 37f855b52a
commit 5293f097f7

View File

@ -22,9 +22,10 @@ int main() {
return 0;
}
assert(r != NULL);
x = strtod(line, &endptr);
if (line == endptr) {
printf("Nepodarilo sa nacitat hodnotu x.\n");
char *px = line;
while (isspace((unsigned char)*px)) px++;
x = strtod(px, &endptr);
if (px == endptr) {
return 0;
}
while (fgets(line, LINE_SIZE, stdin) != NULL) {