Created
January 20, 2012 15:56
-
-
Save m2web/1647989 to your computer and use it in GitHub Desktop.
-2*-2 = 2*2. In other words, when you multiply 2 negative integers it is the same as multiplying the same two positive integers. -x*-y = x*y.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-2*-2 = 2*2. In other words, when you | |
#multiply 2 negative integers it is the | |
#same as multiplying the same two positive | |
#integers. -x*-y = x*y | |
x = 2 | |
y = 3 | |
puts ((x*y + x*-y) + -x*-y == x*y) == | |
((x*y + x*-y) + -x*-y == -x*-y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment