package lanqiao;
public class Peach {
public static void main(String[] args) {
// TODO Auto-generated method stub
T t = new T();
int day = 1;
int peachNum = t.peach(day);
System.out.println("共有" + peachNum + "个桃子");
}
}
class T{
public int peach(int day) {
if(day == 10) {
return 1;
}else if(day >= 1 || day <= 9){
return (peach(day + 1) + 1) * 2;
}else {
System.out.println("day应该在1-10");
return -1;
}
}
}