写给自己看的
#include<iostream>
#include<cmath>
#include<cstring>
#include<iomanip>
#include<ctime>
#include<stdio.h>
#include<stdlib.h>
#include "这是声明类的头文件.h"
using namespace std;
int __power__(int p[],int base,int index);
int main()
{
int p[5];
p[0] = 2;
p[1] = 3;
p[2] = 2;
p[3] = 1;
p[4] = 1;
printf("%d\n",__power__(p,0,1));
return 0;
}
int __power__(int p[],int base,int index)
{
if(1 == p[index])
{
return p[base];
}
else
{
return pow(p[base],__power__(p,base+1,index+1));
}
}
注:1.有问题百度一下
2.解决不了的,看马克思哲学
3.本人老师是宝哥