It is required to raise the number a to the power n. a and n are input to the string type. At the moment I have done only the multiplication of long numbers, but I don’t know how to make a construction in an indecently large degree. All that is at the moment:
int main() { string a,n; int *A, *B, *C, cc; // cin>>a; //cin>>n; a="11111111111548484544876466666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666664548484"; n="11111111111111111111111111111111111111111111111111111115"; A=new int [a.size()]; for (int i=0; i<a.size(); i++) A[i]=a[a.size()-i-1]-'0'; //Умножение числа string само на себя length = a.size() * 2 - 1 ; l=length; C=new int [length]; for (int ix = 0; ix < length; ix++) { C[ix] = 0; } for (int ix = 0; ix < a.size(); ix++) { for (int jx = 0; jx < a.size(); jx++) { C[ix + jx] += A[ix] * A[jx]; } } for (int ix = 0; ix < length-1; ix++) { C[ix + 1] += C[ix] / 10; C[ix] %= 10; } while (C[length] == 0) length-- ; for(int i=length-1; i>-1; i--) cout<<C[i]; system("PAUSE"); }