Since you are trying to figure it out and failed; I will give you the fix to one of the issues.
Your code
change = valChange * 100;
IIRC, what I tried at school to fix this rounding bug....
Type: Posts; User: stahta01
Since you are trying to figure it out and failed; I will give you the fix to one of the issues.
Your code
change = valChange * 100;
IIRC, what I tried at school to fix this rounding bug....
I ran the code and saw the above issue using MinGW GCC (Likely TDM build). Change of $1.43 resulted in 142 cents of change being calculated.
Tim S.