From dcba8699ccd050b5c2a83a59c8c3fd014f68e015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Korpesio?= Date: Wed, 20 Oct 2021 11:22:24 +0200 Subject: [PATCH] prvy --- cv3/program.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index ae787e0..a099af5 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -55,17 +55,18 @@ int main() { } } else { - if(line[0] >= 'a' && line[0] <= 'z') { - printf("bad input\n"); - vys = 1; - break; - } - else { + if(line[0] >= '0' && line[0] <= '9') { p = atof(line); number[a].cislo = p; a++; input++; } + else { + printf("bad input\n"); + vys = 1; + break; + + } } for (i = 0; i < a; i++){