打印101到150之间的质数
package com.guoba.demo; public class LabelDemo { public static void main(String[] args) { //打印101到150之间的质数 //质数是指在大于1的自然数中,除了1和他本身以外不再有其他因数的自然数。 int count = 0; outher:for (int i = 101; i < 150; i++) { for (int j = 2; j < i/2; j++) { if (i % j == 0){ continue outher; } System.out.print(i+" "); } } } }