Arrotondare un numero ad un multiplo in Java
x = 475; int m = (x/10)+1; int rounded = m*10
Divide the number by 10 to get the number of tens, we only want the integer part.
We add 1 to make up for the fractional bit then multiply that by 10.
Of course, that method would return 490 if x = 480.
It'd always be 10 off for any number thats already a multiple of 10.
So check if its a multiple first by using modulus.