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

the diagram is not drawn to scale!!pls​
make mathematical expression and simplify. The sum of 4 and 5 is subtracted form one-third of the difference of 40 and 4.​
what words or phrases mean about the same thing as undaunted
Is 12/19 rational or irrational?
Is 1 1/7 a rational number?
When does behavioral isolation occur?
Find c. Give your answer in the simplest form. c = [?]V [] d 7V2 a 45 30 b C Enter the number that belongs in the green box.
Question 4 of 25 Click to read the passage from "Speech After Having Been Convicted of Voting," by Susan B. Anthony. Then answer the question. The passage provi
100 points and brainliest for correct answer! (ITS NOT B.) The information in the table shows the average weekly temperatures in degrees Fahrenheit of four citi
The Algebra Club has decided to rent a convention center for their annual Algebra Gala. The cost for the rental will be split evenly among the attendees, which