Java 代码实现 1 到 100 之间所有 7 的倍数,每行输出 5 个数字
public class SevenMultiples { public static void main(String[] args) { int count = 0; for (int i = 7; i <= 700; i += 7) { System.out.print(i + ' '); count++; if (count % 5 == 0) { System.out.println(); } } } }
原文地址: https://www.cveoy.top/t/topic/oXfa 著作权归作者所有。请勿转载和采集!