Greetings,
While I was following along in video 23. User Input, I made a mistake by putting all my Guess variables in one spot in my code and came up with an interesting answer. I typed in :
int GuessA, GuessB, GuessC;
int GuessSum = GuessA + GuessB + GuessC;
int GuessProduct = GuessA * GuessB * GuessC;
std::cin >> GuessA >> GuessB>> GuessC;
When I entered my 3 digit code, we’ll say “3 4 5”, I got:
You entered:345
The sum of 3 4 5 is 14807482
The product of 3 4 5 is 1623023616
But when I fixed it up I got what I was looking for. Seeing the importance of Hierarchy, could anyone explain how I got the larger calculation?