diff --git a/a1/program.c b/a1/program.c index a7b076e..2bc82ff 100644 --- a/a1/program.c +++ b/a1/program.c @@ -25,7 +25,8 @@ int main() result=(long double)(result/100); } else{ - result=(result+0.005); + result=(int)(result*100-0.5); + result=(long double)((result)/100); } } printf("Vysledok je :%.2Lf\n",result);