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

What do you think are the easiest and hardest poetic devices.Explain why.
Which of the following best describes a plate of food that is meager in portions? Answered All Changes Saved​
The Rio Treaty of 1947 was a defense agreement between O the United States and Brazil. O the United States and Japan. O North America and South America. O the
To convince your readers that cats make better pets than dogs, what evidence should you use?
What type of contract is created by an agreement that is oral when it is required by the Statute of Frauds to be in writing?
y = x + 2 5x - 4y = -3 Solving systems by equations
Use the slope formula to find the slope of the line through the points (2, 10) and (-3,-6).
MATHEMATICSNEEDSOMEHELPOFYOURSTY<3​
Find the domain & range of the relation {(-5,13), (6,18), (2,-7), (1,4), (-3,-1)}
It's sunny in New York, but it is cool. Where would you expect to find this lizard during the day? Question 16 options: Under a rock In a damp stream bed Baskin