publicclasspeach{publicstaticvoideatPeach(){int total =1;for(int i =10;i>1;i--){
total=(total+1)*2;}
System.out.println(""+total);}publicstaticvoidmain(String[] args){
System.out.println("算机1902徐伟炫");
System.out.println("第一天摘桃子数:");eatPeach();}}
猴子吃桃问题就看这一篇public class peach { public static void eatPeach() { int total = 1; for(int i = 10;i>1;i--) { total=(total+1)*2; } System.out.println(""+total); } public static void main(String[] args) { System.out.println("算机1902徐伟炫");