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

Which process creates metamorphic rocks
El joropo es _____. the national dance of Venezuela another version of the salsa another version of the Venezuelan Calypso
Solve by factoring: 8p2 - 64p = 0
Tiny structures in the cell that carry out the cell's activities are mitochondria nucleus organelles cyotplasm
advantage to farming of having many frost-free days
What was the battle of the coral sea significant for the allies
Explain how the bonds between water molecules affect its properties
What reason does nick give Marjorie for Breaking up with her ?
Generally, how would one work out the surface area of a frustum?
EASY 5 POINTS!!! Which point shows the midpoint of segment PQ?