赞
踩
public class wendu{
public static void main(String[] args){
int n=5;
int retValue=method(n);
System.out.println(retValue);
}
public static int method(int n){
if(n==1){
return 1;
}
return n*method(n-1);
}
}
递归求54321
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。