java求阶乘
时间:2014-06-24 18:59:04
收藏:0
阅读:257
//阶乘
public static int rec(int n){
if(n==1){
return 1;
}else{
return n*rec(n-1);
}
}
评论(0)