0
我得到一個編譯錯誤與簡單的輸出語句:CAN找不到符號
System.out.println(j);
但是,如果沒有它,它編譯罰款。
其次,每當for(condition)
爲真時,它將迭代,但它會如何4/2(不會J迭代到3)?
希望是有道理的。
public class FindFac {
public static void main(String args[]) {
for(int i = 2; i <= 50; i++) {
System.out.print("Factors of " + i + ": ");
for(int j = 2; j < i; j++)
***System.out.println(j);***
if((i%j) == 0) System.out.print(j + " ");
System.out.println();
}
}
}