diff --git a/du4/program.c b/du4/program.c index cbfc483..2272dd8 100644 --- a/du4/program.c +++ b/du4/program.c @@ -39,10 +39,10 @@ for(int i=0;el!='\n';i++){ } sscanf(str,"%lF%c%lF=%lF ",&a,&ac,&b,&c); if(ac=='+')add(a,b,c,ac); -if(ac=='-')subtr(a,b,c,ac); -if(ac=='*')multi(a,b,c,ac); -if(ac=='/')divi(a,b,c,ac); -printf("CHYBA\n"); +else if(ac=='-')subtr(a,b,c,ac); +else if(ac=='*')multi(a,b,c,ac); +else if(ac=='/')divi(a,b,c,ac); +else printf("CHYBA\n"); return 0; }