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

Complete the following statements by writing the missing word (s). 16. If two lines intersect, then their intersection is exactly ________________. 17. ________
How do you solve a system of equations by elimination when the signs are the same
estimate for 412*5.904/0.195any one knw the estimate for this and how to work it out
A rectangular prism has a volume of 105 m3. This prism is enlarged using a scale factor of 4. What is the volume of the enlarged prism?Please Explain...
what are the components of blood?
1. What are the next three terms in the sequence?-1 ,9 ,19 ,29 . . .A. 38, 37, 32B. 40, 51, 62C. 39, 49 , 59D. 38, 47, 562. What are the next three terms of the
Simplify (2x + 3)(x – 4) = ?
solve for x:    x to the negative 3rd power is equal to 27 over 64
What restriction may be necessary to the domain and range of linear equations?
what are the effects of boiling sulfuric acid?