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 verb form is used to indicate perfect tense
Whats the "dead end" branch of the digestive system?
other side for bullying
What is the answer to the problem
6x+72(x+3)−2x+52(x+3)
So in French i was learning some word and one of the words told me that one was They said it was about something about foodMille-feuille
Which was one of Woodrow Wilson's Fourteen Points?
Minions are a happy color yellow. Which of the following statements about minions is correct?A. Minions reflect yellow lightB. Minions absorb red, orange, green
How to solve this question
List the following in order of size: Cell, Chromosome, DNA, Gene, Nucleus