public class Du {public static void main(String[] args) {long fac = fac(n);System.out.println("n的阶乘为:" + fac);}public static long fac(int n){if(n == 1){return 1;}else{return fac(n-1) * n;}}}