subject

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

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
What side length would you specify if you were required to create a regular hexagonal plate that was composed of 33 cm(squared) of sheet metal? dimension the side length to 0.1 cm
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
question
Computers and Technology, 23.06.2019 16:00
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
question
Computers and Technology, 24.06.2019 09:10
  to change the number of rows and columns displayed by the excel object a. select the object and drag a size handle on the active object. b. deselect the object and drag a size handle of the object. c. deselect the object and drag a row or column divider of the object. d. select the object and drag a row or column divider on the active object.
Answers: 2
You know the right answer?
Consider the method total below.
public static int total (int result, int a, int b)
{
Questions
question
Mathematics, 14.02.2020 23:27
Questions on the website: 13722361