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

a)b 256What are the values of a and b in the equation(4x[4x2- ?○ a-2, b-4○ a=-2, b-4○ a-2, b=-4○ a-2, b=-422aaaa0000C日
Which was a cause of the breaking off of the eastern half of the Roman Empire?
zeus industries bought a computer for $2149. it is expected to depreciate at a rate of 25% per year. what will the value of the computer be in 3 years?
This is a college program that prepares students to become officers in the U.S. Military. In exchange for a paid college education students commit to serve in t
what is a naturally occurring gas that's found in most soils and rocks and can cause lung cancer
What are good ways to protect your computer
At the completion of mitosis, the nucleus of a human somatic cell has ___ chromosomes. a. 23 b. 46 c. 92 d. 184
Whom does nick try to contact after he finds gatsby's body? A. klipspringer B. meyer wolfsheim C. dan cody D. gatsby's father
Painters used ____________ to add details to stained glass windows.
synonyms for rising action