+ 1

This is good? Me da error en los 2 casos finales

int houses = input.nextInt(); double x= (double)200/houses; System.out.println(x);

6th Apr 2020, 12:01 PM
Ednier
Ednier - avatar
1 Odpowiedź
0
You need to round up to the nearest whole number. Math.Ceil() rounds always up. Then you just need the integer value of your result.
7th Apr 2020, 12:36 PM
Denise Roßberg
Denise Roßberg - avatar