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

He turned the car around immediately upon remembering that the coffee pot was still turned on. (A) NO CHANGE (B) immediately, and upon (C) immediately. Upon (D)
answer key says 50, but i have no idea how to get it. can anyone please help me?
Divide -162 divided by(-9) need answer
5. Explain why there is a need for the education system to be both academically and technicallyoriented​
Cretically analyse the difference and the point of convergence between floor inspection and functional inspection
What is the equation of the line that goes through (1,-1) and is parallel to y= 3x - 3?
state and explain two default icons on the computer desktop​
Express in the form n : 1 . Give n as a decimal. 6 : 12
Why is bilbo called the friend of bears in the hobbit?
A theorem states that if f is continuous on an interval I that contains one local extremum at c and if a local minimum occurs at c, then f(c) is the absolute mi