ive written this code already :

#include <iostream> using namespace std; void minus1(int m[], int ); void multi(int[] , int[] ,int ,int); void show(int[] , int); int main() { int const a = 6; int const b = 9999; int x[a]={0,0,0,9,9,9}; /*cout << "enter the number : "<< endl; for(int i=0 ; i<a ; i++) cin >> x[i]; cout<<"the number u entered is :"<<endl; */ show(x,a); int y[b] = {0} ; for (int i =0 ; i<a; i++) { y[b-1-i]=x[a-1-i]; } minus1(x,a); while(x[0]!=0 || x[1]!=0 || x[2]!=0 || x[3]!=0 || x[4]!=0 || x[5]!=1) { multi(x,y,a,B)/>; minus1(x , a); } show(y,B)/>; } void minus1(int x[] , int size) { for (int i=size-1 ; i>=0 ; i--) { if(i==0 && x[0]==0) { for(int i=0 ; i<size ; i++) { x[i]=0; } break; } if(x[i]>0) { x[i]-=1; break; } else { x[i]=9; } } } void show(int x[], int size) { for(int i = 0 ; i <size ; i++ ) { cout << x[i]; } cout<<endl; } void multi(int x[],int y[] , int sx , int sy) { int c[sy]={0}; int d[sy]; int pre=0; for (int i= 0 ; i< sx ; i++) { for(int k=0 ; k<sy ; k++) d[k]=0; pre=0; for (int j=0 ; j< sy-sx; j++) { d[sy-1-i-j]=((x[sx-1-i]*y[sy-1-j])+pre)%10; pre = ((x[sx-1-i]*y[sy-1-j])+pre)/10; } for(int l=0; l<sy ; l++) { pre =0; c[sy-1-l]=(c[sy-1-l]+d[sy-1-l]+pre)%10; pre =(c[sy-1-l]+d[sy-1-l]+pre)/10; } } for(int m=0; m<sy;m++) { y[m]=c[m]; } }

but it can calculate the maximum of 9999 and its doing nothing for a number like 99999.

i wanted to know if the problem is with my code or its just impossible to calculate such thing with a laptop ????