You can try debug yourself by just modified your code. e.g.
for(int x=strl1; x>=0; x--){
cout<<"Current x: "<<endl; //test
cout<<"=======\n"; //test
sum=num2[x]+num1[x]+carry;
cout<<"sum is "<<sum<<endl; //test
carry=sum-10;
cout<<"carry is "<<carry<<endl; //test
if(carry<=0){
carry=0;
sum=10%sum;
}
total[x]=sum;
cout<<"total[x] is "<<total[x]<<endl; //test
}
for(int i=0; i<strl1+1; i++){
cout<<total[i];
}
murnesty
Junior Poster in Training
76 posts since Apr 2011
Reputation Points: 10
Solved Threads: 3
Skill Endorsements: 0