In my Java code, I tried to use Math.round()
method. However, when the number is 204.6, method rounds it to 204. I couldn't solve this problem. Here is my code;
//all[i] value of the index zero is 186.
//and it prints 204 not 205.
double updatedPassed = all[i].getPassed()+((all[i].getPassed()*10)/100);
System.out.println(Math.round(updatedPassed));