[刷题] PTA 7-35 猴子吃桃问题

程序:

 1 #include<stdio.h>
 2 
 3 int main() {
 4     int i,n,s = 1;
 5     scanf("%d",&n);
 6     for(i=1; i<n; i++) {
 7         s = (s+1)*2;
 8     }
 9     printf("%d",s);
10 }
原文地址:https://www.cnblogs.com/cxc1357/p/10720347.html