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 challenges did the californios face?
Many colonial people volunteered to fight for the Allied forces because they hoped their service would win their colony's ____
Tear is to sorrow as smile is to
what are some reasons for limiting authority
Help??? What is 3x+5x=67y?
What is the size and shape of a super volcano?
What is the value of x in 15x-10= 20
Over what period of time would you expect to see large changes in mountains,canyons,and similar features of the earth?
A car that travels from point A to point B in four hours, and then from point B back to point A in six hours. The road between point A and point B is perfectly
1,352 pounds is what fraction short of a ton? A) 169/250             B) 77/100               C)13/20             D140/223