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 crime suspect fled the scene when police officers entered the building. How far could he run in 10 minutes if he can run 5 miles per hour?
List the perfect squares between 100 and 500 that are even numbers
Is 0.127 a rational number
What is the value of 1-18+25 if you subtract then add? If you add then subtract?Why is order of operations necessary?
What Was Jackson’s perspective on the McCulloch v. Maryland Supreme Court Case
If 604-72=___,then 532+___=604.Explain the process of checking your work.
How do three planes intersect at one point?
kilo-  -  1,000deka-  -  10How much larger is a kilo- than a deka-?
An experiment consists of rolling two fair number cubes. What is the probability that the sum of the two numbers will be 8? Express your answer as a fraction in
how do I round 3.047 to the nearest hundred and show the math