Question: Visual Basic Programming 1) Write code for a function named opposites that takes two integer arguments named x and y, and returns true if they
Visual Basic Programming
1) Write code for a function named opposites that takes two integer arguments named x and y, and returns true if they are opposite in sign but equal in value, and false otherwise. For example, -1,1 are opposites, while 2 and 2 are not opposites, nor are 1 and 3 or -4 and 5. Do not include any comments or extra lines of code. Hint, if x and y are to be tested, then if x is equal to -1*y then they are opposites.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
