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

What did Captain Nemo do with the money he collected?
what central idea about how women view gender roles is conveyed through Anneke's comments and the author's descriptions of his female friends in college?
Devon’s mother borrowed $4,000 to have some repairs done on the house. The bank is charging 9% simple annual interest on the loan. How much interest will Devon
What's 1650 divided by 55
which cell structures can be found attached to the endoplasmic reticulum? a. vesicles b. golgi apparatus c. ribosomes d. nucleus
According to the 22 amendment to the constitution how long may a president serve
She wants to go to town
This power enables the president to reject a bill passed by the legislature
What is the volume of a cone with a height of 27 cm and a radius of 13 cm? round your answer to the nearest tenth.
visual information is processed by which lobe of cerebrum