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

All of south asia is endangered by the nuclear arms race between which two of that region's countries?
Magnesium and Iodine will combine to make a compound.  Mg_I_ Fill in the blanks with the number of the subscript.
What happened on 1944, june 6?
triangles ABC and DEF are similar. what is the length of side EF
In the sentence below, why did the man feel foolish? “It had been a foolish whim to come at all—foolish, because the object of his quest was not to be found th
an airport parking lot charges a basic fee of $2 plus $1 per half-hour parked. what is the total charge from parking in the lot for 72hours?
Nobels 1. What are the challenges faced by members of the group? 2. What are the potential benefits of belonging to that group?
Which king conquered and united several smaller kingdoms to form Mali? Mutota Ewuare Lalibela Sundiata
This organizational structure is used to prevent issues, or conflicts, and then offer suggestions on how they are resolved. A.cause and affect B.problem and so
What was blanche k. bruce the first african american to do? answers?