Hi, I have this calculator assignment to do and it is going along fine I have about 70% done but I am stuck on a certain part. When I add my two values that I obtained from a random integer I get this crazy number instead of the number that I expected. It is when I get the value CorAns. I marked it with HERE. I know it's not the switch statement itself because if I add it normally it will still give me a weird answer.
On both line 13 and line 78 there are variables named CorAns, that may be a cause of confusion as these are separate and unrelated, apart from having the same name.
Perhaps of more immediate concern is the use of = instead to == when testing for equality.
= is the assignment operator, here c is set to the value 1, if (c=1) and the result is always true.
Wow, Thank you very much. I had somehow fixed the previous problem I had by doing some editing to make it look more clean. The next problem I had was the one you had just given me the answer too. The calculator works great now but it kept on displaying the minus in the equation even when it wasn't. Again thank you.