Addition and Subtraction

I have done this below program but I was assuming the result is 6 for numZebrasAfterTrade. But I can see 8 in the result screen so is that the right result or wrong?

1 Like

I would refresh the page, and maybe even re-paste the code.
This may be reflecting some previous code.

1 Like

Yes after refreshing the page I got the expected output.