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

Why does an electrically heated mirror stay clear when a person has a shower?
What Is Solar Radiation?
factoring, x squared +x-6?
What does "to see the elephant mean"?
Given the volume of a cube is 8 cubic meters, find the distance from any vertex to the center point inside the cube. (A) 1 m (B) √2 m (C) 2√2 m (D) 2√3 m (E) √3
Could you tell me what Are Spores?
Ho does differentiation change an embryo as it develops
what are the effects of boiling sulfuric acid?
solve the formula for the indicated variable (b=rw+r,for w  sollution w=____)
the measure of distance from one point to another is?