输出100以内(不含100)能被3整除且个位数为6的所有整数。
分数 11
作者 zhl
单位 沧州交通学院
输出100以内(不含100)能被3整除且个位数为6的所有整数。
public class Main {
public static void main(String[] args) {
int i, j;
for (i = 0; i < 10; i++) {
j = i * 10 + 6;
if (j % 3 == 0)
System.out.print(j + " ");
else continue;
}
}
}