http://stevenkobes.com/ctest.html
#include<stdio.h>
#include<stdlib.h>
int foo(int x,int n)
{
int val=1;
if(n>0){
if(n%2 == 1){
val *= x;
}
val *= foo(x*x,n/2);
}
return val;
}
int main()
{
printf("%d/n",foo(5,5));
return 0;
}
foo函数实现计算x的n次方