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

where did the portuguese language com from
Please help me with questions 17-20 If you can't do all of it plz just do one of it and tell me which answer goes with each question
what is the number that is least whole number and has three different factors?
Who developed the polio vaccine?
China's diverse topography and location have resulted in which of the following developments? A. its relative isolation throughout its long history B. its role
Gina paid $129 for a bicycle that was on sale for 75% of its original price. What was the original price of the bicycle
Which term describes this diagram? A. trophic level B. food web C. food chain D. matter cycle
when resources are used to write an essay, this needs to be place at the end in order to avoid plagiarism
Indicate in standard for the equation of the line passing through the given points. G(4,6), H(1,5)
what do safety symbols look like? what do they mean? provide at least three examples.