Java 代码
import java.util.Scanner;
public class Main
{
public static int fact(int n)
{
if (n == 1)
return 1;
else
return n * fact (n -1 );
}
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
int n = cin.nextInt();
System.out.println (fact (n));
}
}
这是测试出Y总的数据是怎么出来的吗