用Java编程输出1-100之间所有同时是3和7的倍数的数
public class Main {
public static void main(String[] args) {
for (int i = 1; i <= 100; i++) {
if (i % 3 == 0 && i % 7 == 0) {
System.out.print(i + " ");
}
}
}
}
原文地址: https://www.cveoy.top/t/topic/56V 著作权归作者所有。请勿转载和采集!