#include
main()
{
int y=1,k;
scanf("%d",&k);
if(k!=1)
{ while(k>1)
{k--;y=2*(k+y);}
printf("The monkey got %d peachs in first day.\n",y);
}
else printf("The monkey got 1 peach in first day.\n");
}
原题1
#include
void main()
{
int x=1,i;
for(i=1;i<=9;i++)
{
x=2*(x+1);
}
printf("%d",x);
getch();
}