帮忙看看这程序的问题在哪?
import java.lang.*;
import java.io.*;
public class Factor{
int result;
public int multi(int n){
int end = 0;
result = n;
while(n > 1){
--n;
result *= n;
}
return result;
}
public static void main(String args[]) throws IOException{
int res;
int x;
Factor f1 = new Factor();
if((x = System.in.read()) != -1){
System.out.println(x);
f1.multi(x);
System.out.println("The result is:" + f1.result);
}
}
}