import java.io.*; class tt2{ public static void main (String arg[])throws IOException{ fr2 myfr2=new fr2(); System.out.println("請輸入數字:"); BufferedReader x=new BufferedReader(new InputStreamReader(System.in)); int y=x.indexOF("."); if(y>=0){ double x1=double.paresdouble(x); int x3=(int)x; myfr2.fr(x3); } else{ } } } class fr2{ void fr(int x2){ int tot=1; for(int i=1;i<=x2;i++){ tot=tot*i; } System.out.println(x2+"的階乘="+tot); }
}
最好是齁!!有這麼好混就好= =
是Java 快被他搞死了= =