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
In which situation has the precautionary principle been most strictly applied? (3 points)
Cloud [144]
Answer: The last option.

Explanation: The precautionary principle would be considered to be most strictly applied where the precautionary measure is most disproportionate to the given risk. In all but the last option, there are either measures taken in response to concrete problems, or the precautionary measures are actually relaxed. In the last option, though, there are merely “fears” that antibiotics and growth hormones could cause harm (no experimental evidence), but the school board still takes the strict precautionary measure of mandating that schools only serve organic milk.
8 0
2 years ago
Which disc catch is made by making a "C" with a thumb and fingers?​
kari74 [83]
Backhand throw Pancake catch
Forehand throw

 “C”catch Pivoting
3 0
3 years ago
Explain how this situation in Catalonia and Spain is an example of a devolution ?
Rudiy27

Answer:

yes

Explanation:

yes

8 0
3 years ago
What is meant by the word mahrishi??​
andriy [413]

Answer:

A hindu teacher of mystical knowledge

5 0
2 years ago
Read 2 more answers
AP Psych
MAVERICK [17]
Answer should be A) visual encoding
6 0
3 years ago
Read 2 more answers
Other questions:
  • What is a primary cause of LO/TO accidents?
    5·1 answer
  • Describe one source of renewable energy....Please explain it why would you pick the source, can it be used over the world..Ex
    9·1 answer
  • Someone please help ASAP D:
    14·1 answer
  • What do you not need in order to fill out your 1040
    13·1 answer
  • (SOCIOLOGY) As each religion has different “rules,” what flaws can you find with the Divine Command Theory? Give at least one ex
    10·1 answer
  • The other screenshot got cut off, sorry!
    13·2 answers
  • Landen Corporation uses a job-order costing system. At the beginning of the year, the company made the following estimates:
    11·1 answer
  • ما المقصود بكلمة (الصيحة )في قوله تعالى ( يوم يسمعون الصيحة بالحق ذلك يوم الخروج ) ؟
    7·1 answer
  • Effects of chronic __________ use include kidney disease and dysfunction, liver disease, infections in the luA. tobacco
    11·1 answer
  • What is the handicap for beautiful people?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!