nacirfabeauty7418 nacirfabeauty7418
  • 02-06-2022
  • Computers and Technology
contestada

Consider the following method: public int mystery(int n) { if(n > 6) { return 1 mystery(n - 1); } return n % 3; } What is the value of mystery(10)

Respuesta :

rekhasmileforever
rekhasmileforever rekhasmileforever
  • 15-06-2022

Answer:

Ans1--- The output is 9 Explanation--- mystery(5)=mystery(4)+2 mystery(4)=mystery(3)+2 mystery(3)=mystery(2)+2 mystery(2)=2+1=3

Answer Link

Otras preguntas

Alexa owns a total of 45 fiction and nonfiction books. If the number of fiction books is 15 more than 4 times the number of nonfiction books, how many fiction b
in william's "the red wheelbarrow," what covers the wheelbarrow
Which symbol creates a true sentence when X equals six 9•4-2x___2(9-x)
what evidence from the text supports the idea that Lady Macbeth questions her husband's ability to kill the king
In 2015 the GPA's deepwater ports and barge terminals supported more than 352,000 jobs throughout the state, and the agency contributed $2.5 billion in state an
Find the LCM. x^2+2x-8, x+4
how many whole numbers are less than 600 but are multiples for both 8 and 11
Explain 3 ways how the manager of a radio station may contribute to the education of a rural community. (Social Studies)
need help please...answer correctly ​
What is the quadratic in vertex form that has an a value of 8 and a vertex of (5, 6)? Answer choices in image,