程序代码——5个换行输出一百以内3或者7的倍数 Post By:2011/3/11 12:21:44 [只看该作者]
public class Exec { public static void main(String[] args) { int j = 0; for (int i = 1; i <= 100; i++) { if (i % 3 == 0 || i % 7 == 0) { j++; System.out.print(i + "\t"); } if (j == 5) { j = 0; System.out.println(); } } } }}