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

if five notebooks cost $5.25 , how much would three notebooks cost?
There are 21 students  in Mr.Tentlers  class The students divided themselves evenly  into 3 groups.how many  students  are in each  groups?
A weather reporter reads aloud the number of meters of snowfall. the amount is 0.103 meter. What words should the reporter use on the air to explain the amount
Round 315 to the nearest ten
How many neutrons are probably in the nucleus of an element of atomic weight 197?  a. 43 b. 79  c. 83  d. 100  e. 118
What European countries were competing for Asian trade during the age of exploration?
the difference between the square roots of a number is 30. What is the number?
how can you use number patterns to find the least common multiple of 120 and 360
The rain shadow effect is used to describe rainfall around certain mountain ranges. Which of the following statements is true? (A) The northern hemisphere and
how do you convert 1.66 into a fraction