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

What group of people was taken to America and sold as slaves?
We elect a U.S. Senator for how many years?
Who invented hunting?
Which term represents a type of nuclear reaction? (1) condensation (2) vaporization (3) single replacement (4) natural transmutation
Find the x and y intercept of the line 5x-4y=30.the graph
What is freedom of religion?
Which compound is an electrolyte? (I) CH3CHO (3) CH3COOH (2) CH3OCH3 (4) CH3CH2CH3
In what month do we vote for President?
Name one U.S. territory
what does monarchy mean and how can you put it into a sentence