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

Identify the reagents a-i that you would use to accomplish each of the following transformations. a) CH₃CH₂OH a→ CH₃COOH b) C₆H₆ b→ C₆H₅Cl c) CH₃CH₂COOH c→ CH₃C
opinion writing about parents pick out the child clothes​
Which equation has infinitely many solutions? 1) 5(2x + 4) = 10x - 12 2) 5(2r + 4) = 10(r + 2) 3) 5(2r + 4) = 12r 4) 5(2x + 10) = 20(x + 1)
does right circular cone have apex?
HELP ME IM DYIING HEREEEE!
What does –3.6 ÷ –1.5 equal
7/10 of what number is 0.14 show all steps
For the graph whose function is shown, find f(0).
What is the value of b in the equation -4 = 6 + b?
what is the y intercept of the lline 2x-3y=-12