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

Mieko bought 2 gallons of paint. she used 1/4 of the paint on her bedroom, 3 quarts on the hallway, and the rest of the paint in the living room. how many quart
If the diameter of a youth softball is 3.5 inches and the diameter of an adult softball is 3.8 inches, what is the approximate difference in their volumes? use
If erin speaks to her husband on tuesday, what word or phrase does the modifier belong to?
Simplify this expression. (2-5√6)-3√2 A. 6√2-15√6 B. 6√2-15√12 C. 6√2-8√6 D. 6√2-30√3
Jeff is going snowboarding this weekend and wants to determine the exact slope of this hill.
help please!! i need to turn this in
Im very stuck lol...
Lisa is a high school student who went to see her guidance counselor. she was given a questionnaire that contained these questions: what activities do you enjoy
Find the period and amplitude of the function. y=5cos2O
Which does not accurately describe the Cuban Missile Crisis? Question 27 options: The Soviet Union and the United States were on the brink of war. Relations bet