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

please help brianliest answer please​
What are the lines in the picture below called?
how do the lungs of spiders differ from human lungs?
in a group discussion, effective participants
The bag contained only red marbles and white marbles. If the ratio of red marbles to white marbles was 5 to 4, what fraction of the marbles were white?
What encourages produces to reduce costs and increase revenues? Question 15 options: marginal analysis the profit motive opportunity costs the production possib
Which beat illustrates the importance of DNA technology
If 15 and three force is the base and 147 is the area what is the height of a polygon
The diagram below shows a sandbox and the frame thatsurrounds it. What is the area of the frame (the shaded area)? (The length and width are in feet)
What is 22% out of 400