用递归函数编写计算阶乘的代码
import java.util.Scanner;/*NowJava.com 提 供*/ public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println(factorial(input.nextInt())); input.close(); } static int factorial(int n) { // your code here } }