產生立即終止訊號!! Killed
import java.util.Scanner; public class JAVA { public static void main(String[] args) { Scanner IN = new Scanner(System.in); int a = 1, c = 0; while (true) { int b = IN.nextInt(); while (a <= b) { if (b % a == 0) { c = c + 1; } a = a + 1; } if (c == 2) { System.out.println("質數"); } else { System.out.println("非質數"); } } } }
我用netbeans都可以執行
判斷是否為質數也沒有問題
為何他會說我執行時期錯誤??