package 阶乘;
import java.util.Scanner;
public class jiecheng {
public static void main(String[] args)
{
int fun=1;
Scanner input =new Scanner(System.in);
System.out.println ("请输入一个整数");
int n=input.nextInt();
for(int i=1;i<=n;i++)
{
fun=fun*i;
}
System.out.println (fun);
}
}
转载于:https://www.cnblogs.com/langsblog/p/8678319.html