i的j次方
int fu(int i,int j){
if(j==1) return i;
else return(i*fu(i,j-1));
}
i的平方和
#include <iostream>
using namespace std;
int main(){
int f(int);
int n;
cout<<"input the number:";
cin>>n;
cout<<"The result is "<< f(n)<<endl;
return 0;
}
int f(int n){
if(n==1) return 1;
else return(n*n+f(n-1));
}