How to round a number in a big way in Java? I have to get an answer z = 5.
int x=82; int y=20; int z; z= x/y.
Provided x and y are positive, add 1 less than the denominator to the numerator:
int x=82; int y=20; int z= (x + y - 1)/y;