你看一下我写的:long int getpower(intx,inty){if(x==0){return 0;}else if(y==0){return 1;}else{return x*getpower(x,y-1);}}