From db11a44dc52d7861800e9a32b348ab90d837a5dd Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Sun, 27 Mar 2022 14:47:33 +0200 Subject: [PATCH] aaa --- du4/program.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/du4/program.c b/du4/program.c index 117f093..f56678c 100644 --- a/du4/program.c +++ b/du4/program.c @@ -23,6 +23,10 @@ int main(){ float num2=strtof(start,&end); start=end; + while((*start)<'0'||(*start)>'9'){ + start++; + } + float vysledok2=strtof(start,&end); printf("%f\n",vysledok2); float vysledok=0; @@ -50,7 +54,7 @@ int main(){ printf("ZLE\n"); } - printf("%.3f\n", vysledok); + printf("%.3f\n", vysledok); return EXIT_SUCCESS; }