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

What happened to the greenish warbler birds as they migrated from the southern portion of their range up around the Tibetan Plateau? What are two main distincti
When heinrich schliemann excavated grave circle a in mycenae in the late 19th century, he discovered a treasure of ____.?
I forgot how to do this ?I need help in interest please help
What is a situation in which you would use fractions to express a number less than 1? What is a situation in which decimals seem to work better? Please answer
"we must all face the choice between what is right and what is easy."what do you think this means and how can you apply it to your own life
Conserving water can save money while protecting the environment. Please select the best answer from the choices provided T F
a bar graph shows that sports books received 9 votes.ifthe sale is 0 to 20 by twos,where should the bar ende for the sports books?
How many ml of water would be displaced by 408g of lead?
help me please. thank you..
What was Betty Smith’s primary purpose in writing A Tree Grows in Brooklyn?