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

how old am i if 200 reduced by 2 times my age is 16
You have 44 text messages in your inbox. Your inbox is 88% full. How many messages can your cell phone hold?
What is the greatest common factor of 117 & 351 And What is the greatest common factor of 35 & 149
What type of government combines both unitary and confederal political systems?
Identify an angle adjacent to the given angle. ∠FLH A. ∠KLJ B. ∠JLI C. ∠HLI D. ∠ILK
How did the Constitution overcome the weaknesses of the Articles of Confederation? The new plan of government centralized power in the federal government at the
x to the 2 power = -169 solve for X
what are the equivalent fractions to 20/24
What is 9/16 closest to 0,1/2, or 1 and why?
Math problem solving 9-3 A new car costs$13,000and is depreciating by $900each year.how much will the car be worth after 4 years?