C++ System Calculations

0 josh stainthorpe · November 1, 2015
i was mesing around with int's and made my system slave calculate things. Anyhwo, I got courious and started messing with negative and positive numbers, so i mada a calculation ("((-20) + (-10)) - ((-30) - (5))" to be exact ) whe ni ran the program it gave the right awser (5) but it was supposed to be -5. im just courious and i wanted to know how i can fix this,

thanks in advace for helping. :)

Post a Reply

Replies

Oldest  Newest  Rating
0 c student · November 2, 2015
as you've said the right answer is 5, you cannot get two different correct solutions in maths.
  • 1

C++

106,946 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator