1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sertanlavr [38]
3 years ago
14

public static int recur(int x) { if (x >= 0) return x + recur(x - 1); return 0; } What is returned by the method call recur(9

)?
Advanced Placement (AP)
1 answer:
guapka [62]3 years ago
6 0
9 >= 0 so return 9 + ...
8 >= 0 so return 8 + ...
7 >= 0 so return 7 + ...
6 >= 0 so return 6 + ...
5 >= 0 so return 5 + ...
4 >= 0 so return 4 + ...
3 >= 0 so return 3 + ...
2 >= 0 so return 2 + ...
1 >= 0 so return 1 + ...
0 >= 0 so return 0 + ...
-1 is not >= 0 so return 0.

Now string together all the returns..
9+8+7+6+5+4+3+2+1+0+0=45

recur(9) returns 45
You might be interested in
Who can help me with this?
Nina [5.8K]
I don’t know if it’s glitching for me, but I can not see the picture
5 0
3 years ago
Read 2 more answers
While Melissa was working at the factory, a heavy machine fell on her and broke her legs. Her doctors say that she needs three m
Vikentia [17]
I believe D since she will be out of work.
7 0
3 years ago
Read 2 more answers
I have no idea any help would be good.
kherson [118]

Answer:

The answer is A

Explanation:

I hope this helps!

5 0
3 years ago
What major innovation made james Joyce one of the most influential writers of the 20th century, and what did this technique cons
SCORPION-xisa [38]

Answer:

<h2><em><u>stream-of-consciousness</u></em></h2><h2 />

D. James Joyce's Ulysses is one of the most influential novels of the twentieth century, due largely to the innovations of the literary technique known as stream-of-consciousness.

3 0
3 years ago
Hey follow me I will mark you brainliest ​
algol13

Answer:

Not supossed to do this but thanks!

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • 1. Write the recursive formula and the explicit formula for the sequence {3,6,12,24,48,...}. Show all work.
    15·1 answer
  • What term describes the measurement of the force of gravity on an object
    12·1 answer
  • So I’m supposed to solve #3 with the given instructions:
    7·1 answer
  • Which of these statements are the same for both nuclear reactions and chemical reactions? Check all that apply.
    5·2 answers
  • The _____ function of social work focuses on eliminating factors that hinder an individual’s ability to function effectively and
    13·1 answer
  • A cell tower is capable of providing a signal to cell phone users within a 30 mile radius. 1/4 of this area has devices to block
    15·1 answer
  • I got confused help please.
    13·2 answers
  • GIVING BRAINLIEST TO WHOEVER FINDS THIS FIRST :P
    14·2 answers
  • Block A with mass ma rests on a horizontal tabletop, while block B with mass me hangs from a string of negligible mass that pass
    15·1 answer
  • Help if you’re smart in science
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!