I have these two variables
double num = 540.512 double sum = 1978.8
Then I did this expression
double total = Math.round((
Your method is right, all you have to do is add a .0 after both the tens and it will fix your problem!
double example = Math.round((187/35) * 10.0) / 10.0;
The output would be:
5.3