From ad3a6f44694d52908a72414675cb451ff3205625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Korpesio?= Date: Wed, 20 Oct 2021 11:18:38 +0200 Subject: [PATCH] prvy --- cv3/program.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index 46bb6e7..c95d720 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -55,10 +55,16 @@ int main() { } } else { - p = atof(line); - number[a].cislo = p; - a++; - input++; + if(line[0] >= 'a' && line[0] <= 'z') { + p = atof(line); + number[a].cislo = p; + a++; + input++; + } + else { + printf("bad input"); + break; + } } for (i = 0; i < a; i++){