Ive been racking my brain here:
cout << orig << " * " << count << endl;
string check = multiply2(orig, count);
cout << "Check was: " << check << " and number is: " << number << endl;
cout << "the compare result: " << check.compare(number) << endl;
if(check.compare(number) == 0)
{
cout << "wahoo it matches!!! we did it! " << endl;
}
else
{
cout << "Doesnt Match " << endl;
}
I’m expecting it to match and print wahoo it matches!!! we did it! but its instead saying it doesn’t match.
Here is my output:
1 * 900000
Check was: 900000 and number is: 90000
the compare result: 1
Doesnt Match
Anyone have idea why they arent matching?
You compare
900000(as in 9E5) versus90000(as in 9E4). Computer is right.