Question: using visual studio please (2.5 marks) Two integers x and y are said to be equivalent modulo a positive integer m iff the remainder of

 using visual studio please (2.5 marks) Two integers x and y

using visual studio please

(2.5 marks) Two integers x and y are said to be equivalent "modulo" a positive integer m iff the remainder of dividing x by m is equal to the remainder of dividing y by m. Write a C++ code which asks the user to enter a positive modulus together with two integers that are assumed to be not EQUIVALENT based on the entered modulus, and then outputs whether the assumption is true or false. As an example, if the user enters m = 5, and the two nonequivalent integers 3 and 8, then the program displays the message "Your assumption that 3 and 8 are not equivalent modulo 5 is false. Do not use any flow control statements in your code. (Hint: use 'bool" type and configure cout to print bool values as true or false instead of 0 or 1, as follows "cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!