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 is the radius of a circle whose equation is (x-7)2+(y-10)2=4
How many ways can one rearrange the letters in the word circumference to form a string of 13 letter strings or words sensible or not
Height of a cylinder with radius 6cm and volume of 904.77cm2
How does the introduction grab the reader's attention?
Why are outer electrons of some substances able to be removed by friction? The outer electrons are not as tightly bound as ones closer to the nucleus. The outer
The dots on the map represent deep, underground hydrothermal resources in the United States. Why do more hydrothermal resources exist in the western regions of
According to karl marx, what social relations matter most in a capitalist system?
What does motivation mean in language arts?
Two ants start at the origin of the rectangular grid shown above where each unit represents an inch. They roam around in different directions for exactly 30 sec
Suppose the length, width, and height are each doubled. How does the volume change? The length and width are 4, the height is 5.