递归

 

a的b次方

int pow(int a,int b){

if(b<0)return 1;

return pow(a,b-1)*a;
}

 

posted @ 2016-03-10 14:35  谢小锋  阅读(104)  评论(0)    收藏  举报