diff --git a/du3/program.c b/du3/program.c index 7e93977..a0bb648 100644 --- a/du3/program.c +++ b/du3/program.c @@ -43,9 +43,9 @@ int main(){ num+=p*n; } - float num2=(round(num*100))/100; + float num2=(round(num*10))/10; - printf("Vysledok je: %f\n", num2); + printf("Vysledok je: %.2f\n", num2); return EXIT_SUCCESS; }