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

(give brainleist for a real answer Plz help)use details from the text homework from the future, the encouragement app to write an answer to the question below.
X= (-6x+125) (11x + 6)
im really confused i hope this doesnt take to much time please help it would me so much to me.
The value of tan60° is ______ . * 1 point 1/√3 0 1 √3
Write the equation that is parallel to the question: y = -2/3x - 5 and goes through point: (6,-1)
Contesta 1, ¿Quién corta el cesped en tu casa? ¿Cuándo corta el cesped? 2.¿Quién lava el coche? ¿Cuándo lava el coche? 3.¿Quién da de comer al perro/gato? ¿Cuán
g The alkali metals are able to displace hydrogen readily from water. The alkaline earth metals are able to do so as well, although not nearly as vigorously. Th
Solve for x. SHOW WORK PLEASE
quadritlet ABCD is rotataed at 90 about the orgin what are the coordinates of quadriltel A'B'C'D' A 5,5 B 5,1 C 2,1 D 1,5
The greatest amount of genetic variation is produced in offspring that reproduce - A. sexually through fission