package n;
import java.util.Scanner;
public class jiechen {
public static void main(String[] args)
{ Scanner sc=new Scanner(System.in);
System.out.println("输入阶乘:");
int n=sc.nextInt();
System.out.println("结果为:"+f(n));
}
public static int f(int n) {
int sum=1;
for(int i=1;i<=n;i++)
{ sum=sum*i;
}
return sum;
}
}