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! I will mark as brainliest IF answer is right. <3
When driving in foggy weather driver should not their headlight
I forgot how to multiply by division and multiplication. It’s been such a long time since I’ve done it i’ve practically forgot how it even works. Can anyone exp
whats a better ending to the story "the gift of the Magi"?​
Solve for 2x+3y+6z when x=4, y=3, and z=6.
Any answers to 1/5 divided by 1/4
A nanometer is a unit of mass, whereas a nanosecond is a unit of time. Question 1 options: True False
Given (21,7) and (x, 1), find all x such that the distance between these two points is 17.
A technology company manufactures a smartphone for $350. The company sells each device for $850. It has weekly production costs of $25,000. How many smartphones
I need some help with this.