?? factors.java
字號:
package factors;import javax.swing.UIManager;import java.awt.*;import java.io.*;// 計(jì) 算 n 的 所 有 因 子public class factors { //Main method public static void main(String[] args) throws IOException{ int n; InputStreamReader ir; BufferedReader in; ir=new InputStreamReader(System.in); in=new BufferedReader(ir); System.out.print("input n is :"); String s=in.readLine(); n=Integer.parseInt(s); System.out.println("factors of "+n+" is :"); for (int i=1;i<=n;i++) { if (n%i!=0) continue; System.out.print(i+" "); } }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -