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

"But though this be a state of liberty, yet it is not a state of licence: though man in that state have an uncontroulable liberty to dispose of his person or po
Given: x - 5 > -10. Choose the solution set.
|-5x| +4=-11 whats the answer?
8.517 write this number in two forms
I need help with this,
1) X/4+10=14 A)96 B)46 C)16 D)-16 2) 2(2-2x)=-3x A)-4 B)4 C)6 D)0 3) 3.75x+3.7=1.7+1.75x A)10 B)-1 C)1 D).1 Answers : B C C ???
Jake earned $430 in interest on a $2500 investment after 18 months. What was the annual interest rate? (round to the nearest whole percent)
What is the value if the digit 4 in the number 524,897,123
Evaluate. 72÷(1/3−2)+4
partial products I need help pizza