package sp0423;
public class testBreak {
public static void main(String[] args) {
int count = 0;
while (true) {
int m=(int)(Math.random()*100);
System.out.println(m);
count++;
if (m==66){
break;
}
}
System.out.println("次数"+count);
}
}
package sp0423;
public class testContinue {
public static void main(String[] args) {
int count=0;//计数器
for (int i = 0; i < 22; i++) {
if (i%3==0){
continue;
}
System.out.print(i+"\t");
count++;
if (count%5==0){
System.out.println();
}
}
}
}