diff --git a/du4/program.c b/du4/program.c index c30c0fb..3ee6a73 100644 --- a/du4/program.c +++ b/du4/program.c @@ -22,7 +22,17 @@ int main(){ char *start=priklad, *end=NULL; for(int c=0;c'9')&&start[idx]!=' '&&start[idx]!='='&&start[idx]!='+'&&start[idx]!='-'&&start[idx]!='*'&&start[idx]!='/'&&start[idx]!='.'){ + skip=1; + printf("CHYBA\n"); + break; + } + } + if(skip==1){ + continue; + } float num1=strtof(start,&end); if(end==start){ printf("KONIEC\n"); @@ -60,7 +70,7 @@ for(int c=0;c -0.0000001){ + if (vysledok2-vysledok < 0.001 && vysledok2-vysledok > -0.001){ printf("OK\n"); } else{