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 ANSWER!! THANK YOU!!* Gerry ran 3/8 of a mile on Monday. He ran 5/8 of a mile on Tuesday. He ran ½ mile on Wednesday. How many miles did Gerry run in al
Can you Help me please lol
What substance do you think reacts with a cut apple to turn it brown?
Please answer these for brainlyest:D
How did the development of state constitutions influence the national plan for government?
Evaluate the trigonometric function of the quadrant angle, if possible. (If an answer is undefined, enter UNDEFINED.) sin 0
which president asked Benjamin Banneker to help design the new capital
Which word could correctly replace the word distinctly as it is used in this excerpt from Mark Twain’s The Prince and the Pauper? During the ensuing week, the d
Is it possible to construct Triangle ABC with angles 40, 60 and 90 degrees? EXPLAIN WHY OR WHY NOT
Why did Hitler follow through with the Beer Hall Putsch?