Ask Question
9 February, 13:27

Consider the method total below.

public static int total (int result, int a, int b)

{

if (a = = 0)

{

if (b = = 0)

{

return result * 2;

}

return result / 2;

}

else

{

return result * 3;

}

}

The assignment statement

x = total (5, 0, 0);

must result in

x being assigned the value 4

x being assigned the value 8

x being assigned the value 5

x being assigned the value 2

x being assigned the value 10

+3
Answers (1)
  1. 9 February, 15:55
    0
    That code, if it even compiles, won't produce those values with that call.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Consider the method total below. public static int total (int result, int a, int b) { if (a = = 0) { if (b = = 0) { return result * 2; } ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers