package A练习;
//猴子吃桃子
public class Arrays练习3 {
public static void main(String[] args) {
int Sun = gersun(1);
System.out.println(Sun);
}
private static int gersun(int num) {
if (num == 10) {
return 1;
}
return (gersun(num + 1) + 1) * 2;
}
}
猴子吃桃子递归
最新推荐文章于 2024-09-08 12:41:07 发布