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

When choosing a four-number PIN,(personal identification number), how many different pins are possible?( the choice of digits are 0-9 are available for each num
Find the domain of the function f(x)=12x+3. what is the only value of x x not in the domain?
A(n) ______ is someone who is not in the military.
What was President Taft's official attitude towards trusts? A. He refused to break up trusts. B. He broke up only half the number of trusts that R
What is answer to number 3 PLZ HELP HURRY IM TIMED
What percent of the first 20 natural numbers are prime one-digit numbers?
PLEASE PLEASE I NEED HELP ASAP
write an equation in slope-intercept form for a line with slope -3and y intercept -1
What is that factored form of r^27-s^30?
Work out m and c for the line y=x+6