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

if f(x)=3x+7 and g(x)=2x-5 find g(f(-3))A. -26 B.-9 C. -1 D. 10
If a pizza costs 2.85 to make and customer pays 8.95 how much profit have I made as a percentage
Who do you think snitched on Anne Frank and her family?
Which of the following changes will decrease the rate of collisions between gaseous molecules oftype A and B in a closed container? A. decrease the volume of t
how do i solve this infinite geometric series?64/25-16/5+4-5
Simplify 2(5x-3)-(2x+4), 24x-12y+40÷4, (2x)(3y)+2(-xy)
A swimming pool  20 m long and 10 m wide is surrounded by a deck of uniform width. The total area of the swimming pool and the deck is 704 m^2. Find the width o
a meter stick casts a shadow 1.4 m long at the same time a flagpole casts a shadow 7.7 m long. The triangle formed by the meterstick and its shadow is similar t
What is the value of the expression shown below when a=51, b=2, and c=17? 3(a\c)^2
Two ships leave whittier, Ak at 7 AM. The first ship sails towards Valdez on a 54° course at a constant rate of 36 mi/h. The second ship sails towards Knight is