Tuesday, July 28, 2009

"Find the difference between the values without using the subtraction operator?"?

please solve in c++ or java

"Find the difference between the values without using the subtraction operator?"?
you could use the mod operator, uses remianders


5%3=2


6%2=0
Reply:well you could use the unary minus, which isn't the subtraction operation...technically.





a+-b


No comments:

Post a Comment