Scanner scan = new Scanner(system.in);int input = scan.NextInt();if(input%3==0||input%5==0){system.out.println("能被3或者5整除");}else{system.out.println("不能被3或者5整除");}望采纳
if ( (x % 3 ==0) || (x % 5 == 0)) { //正确} else { //错误}
?