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

Write an equation in point-slope form of the line through point p(9, -1) with slope -5.
Is this situation possible? <WXY and <WXZ are supplementary, and <YXZ is a right angle.
Q.3. Does the poet enjoy teaching? Justify your answer.
Of the students at Milton Middle School, 99 are girls. If 45% of the students are girls, how many total students are there at Milton Middle school?
According to legend how did the people in athens find out what had happened at te battle of marathon
Nacl , or halite, dissolves in water. which type of bond is most abundant which allows it to dissolve?
The fundamental purpose of the starting phase of a project is​ ________.
To go bowling it costs $2 to rent shoes and then $3.25 for each game bowled. Which of the following functions gives the total cost to bow g games?
Can someone help me with geometry, my teacher doesn't explain anything?
WILL GIVE BRAINLIEST!!! LOOK BELOW TO ANSWER MY QUESTION.!