逢七必过:数字包含7或者是7的倍数都不打印
public static void main(String[] args) {
for (int i = 1; i < 1000; i++) {
int ge = i % 10;
int shi = i / 10 % 10;
int bai = i / 100 % 10;
if (ge == 7 || shi == 7 || bai == 7 || i % 7 == 0) {
continue;
}
System.out.println(i);
}
}
public static void main(String[] args) {
int i = 1;
while (i < 1000) {
int ge = i % 10;
int shi = i / 10 % 10;
int bai = i / 100 % 10;
if (ge == 7 || shi == 7 || bai == 7 || i % 7 == 0) {
i++;
continue;
}
System.out.println(i);
i++;
}