Consider the following method: For each of the following calls, indicate the value that is returned: a.

Question:

Consider the following method:

public static int mystery (int x, int y) { while (x != 0 && y != 0) { if (x < y) { y -= x; } else { -= yi return x + y;

For each of the following calls, indicate the value that is returned:

a. mystery(3, 3)

b. mystery(5, 3)

c. mystery(2, 6)

d. mystery(12, 18)

e. mystery(30, 75)

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: