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

4 important details that establish john lewis character/morals
it states us to compare two columnsplease help me​
Rewards and Punishment examples
how can stress caused by peer pressure negatively impact someone life quality
lisa borrows $18 000 over 5 years from the bank. The loan is charged at 8.4% p.a. simple interest. Find the total amount owing at the end of 5 years. (2 marks)
Nielson Motors has a share price of $50.00. Its dividend was $2.50, and you expect Nielson Motors to raise its dividend by approximately 6% per year in perpetui
definition of populism​
One of the acute angles of a right triangle is 36 degrees. Find the other acute angle.
Dans chaque cas réduire l'expression 2x-3+8-4x+x²
Add the additive inverse of 5 to the product of -1 and -4 show all​