1.

The quotient and remainder when -1 is divided by 3 is?(a) -1 and -1(b) -1 and 2(c) 1 and2(d) -1 and -2I got this question at a job interview.The doubt is from Algorithms in chapter Algorithms of Discrete Mathematics

Answer»

The correct ANSWER is (b) -1 and 2

To explain I WOULD say: According to the Division Algorithm -1 = 3(-1) + 2. Hence, QUOTIENT when -1 divided by 3 is -1 = -1 div 3 and remainder when -1 divided by 3 is 2 = -1 mod 3.



Discussion

No Comment Found

Related InterviewSolutions