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

between what pair of numbers is the product of 289 and 7
What conflict drives the action forward in Romeo and Juliet? A. an ongoing argument between Mercutio and Romeo about women B. an ancient feud between the Montag
How do writers use direct characterization in a story? a. by unveiling the thoughts and actions of the character b.through the writer’s statements about the cha
the basic requirements for industry growth are capital natural resources true or false
The unblocking of popular social media websites in Myanmar is an indication that
After Salome dances for Herod, he offers her one half of his ____, but instead of his kingdom she asks for the head of John the Baptist. A. travesty B. domain C
what are supporting ideas?
Which two words below are using the hyphen correctly? A. Ex-husband B. Pre-school C. Self-evident D. Re-tell
add the like terms: -3ab+-10a+-8a
Who is the intended audience of the Abraham Lincoln’s The Gettysburg Address?