0
cant solve Hallowen candy What is the problem
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner input = new Scanner(System.in); int hou = input.nextInt(); double dol = 2.0; double P = Math.round((dol / hou) * 100); if(hou >= 3) { System.out.println((int) P); } } }
2 Respostas
+ 3
Always print, not on if >= 3. Also, please read the task description carefully: It asks us to round ***up***
0
Thanks that worked