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

Kim estimates that the faucet in her kitchen drips at a rate for 1 drop every 2 seconds. Erik wants to klnow how many times the faucet drips in a week.
Given the inequalities y > 5x-8 and y >3x+4, find the point that satisfies one inequalities but not them all
among the qualities listed on the human relations scale, the most important one for the building new relationship is?
Round 13 513 to the nearest thousand
What is the difference between displacement and double displacement reactions?Write equations for these reactions?
Solve the system of equations.3x+3y+6z=33x+2y+6z=74x+4y+7z=4
among the qualities listed on the human relations scale, the most important one for the building new relationship is?
What do you mean by corrosion? How can you prevent it?
name 2 sound devices and what type they are from the song Where Is The Love by the Black Eyed Peas.
A transformer has a primary coil with 600 turns and a secondary coil with 300 turns. If the output voltage is 320 volts, what is the input voltage?A. 8 volts