摘要:import java.util.Scanner;
public class JeChen {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.p
import java.util.Scanner;
public class JeChen {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("请输入一个整数:");
int n=input.nextInt();
System.out.println(n+"!="+f(n));
}
static long f(int n){
if (n==1)
return 1;
else
return n*f(n-1);
}
}