From 5293f097f7f488740423d3710c49a79fb981f11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jana=20Kapalkov=C3=A1?= Date: Thu, 5 Mar 2026 18:37:04 +0100 Subject: [PATCH] commit --- du1/program.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/du1/program.c b/du1/program.c index 8195c4b..26fe26f 100644 --- a/du1/program.c +++ b/du1/program.c @@ -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) {