fork download
  1. #include "stdio.h"
  2.  
  3. int sumPeach(int day)
  4.  
  5. {
  6.  
  7. if (day == 10)
  8.  
  9. return 1;
  10.  
  11. else
  12.  
  13. return 2 * sumPeach(day + 1) + 2;
  14.  
  15. }
  16.  
  17. int main()
  18. {
  19.  
  20. int sum;
  21.  
  22. sum=sumPeach(1);
  23.  
  24. printf("The first day of picking peaches number is:%d\n",sum);
  25.  
  26. }
Success #stdin #stdout 0s 10304KB
stdin
Standard input is empty
stdout
The first day of picking peaches number is:1534