public class Test{
public static int result(int parameter){
if(parameter<=1) return 1;
int number = parameter*result(parameter-1);
return number;
}
public static void main(String[]args{
int result = result(5);
System.out.println(result);
}
}
运行结果是:120
繁华开满天机