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

The Roman republic ended when which leader came to power
the equation is : answer x:
Which describes the combined variation in the formula h=v/ πr^2? h varies directly with V and inversely with the square of r. h varies directly with V and inver
M. In a short paragraph address the following questions: 1. What continent Is represented on the map ? 2. Who is the man in the cartoon? 3. What is the symbol o
A cylinder has a volume of 320 pi cubic inches and a height of 5 inches what is the radius
I just need to fill the table out
Internacional is prefix roof or suffix
A varies inversely with B. When A is 0.25, B is 4. Find the value of B when A is 5.
Balance the chemical equation
what number do u see ​