函数,是素数返回true,不是false static boolean judge_prime(int number) // 判断是否是素数{boolean sign = true; for (int i = 2; i number; i++) { if ( number % i == 0) { sign = false; break; } }return sign; }
static boolean judge_prime(int number) // 判断是否是素数 { boolean sign = true; for (int i = 2; i < number; i++) { if ( number % i == 0) { sign = false; break; } } return sign; }