1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
package 控制语句;
public class TestContinue { public static void main(String[] args) { int count = 0; for(int i=1;i<=100;i++) { if(i%3==0) { continue; } System.out.print(i+" "); count++; if(count%5==0) { System.out.println(); } } } }
|