我是编程新手,我不明白为什么||
在第十行while (one%6||one%17){
被认为是二元运算符的坏操作数类型。如果有人可以帮助我理解这一点,将不胜感激。
import java.util.Scanner;
public class DivisibleBy6or17 {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
System.out.print("Enter Value: ");
int one = in.nextInt();
int sum=0;
while (one%6||one%17){
System.out.print("Enter Value: ");
sum=+1;
}
System.out.print("Numbers read: " + sum);
}
}