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
Three methods used by government to seize the assets of foreign firms?
Over [174]

Answer:

Three methods used by government to seize the assets of foreign firms are : Expropriation, Confiscation and Domestication

Explanation:

Expropriation presents the seizure of foreign assets by a host government with payment of compensation and certain fund available to the owners of the assets.

The difference in Confiscation process is that there is no compensation or any kind of funds to any foreign firm by a host government.

Domestication process provides governments with partial ownership transfer and companies needs to focus on major local productionthat is kept in the host country. Local staff and managers needs to be hired and products or services should reflect the needs of local market.

8 0
3 years ago
-Source: Edward Humes, historian, Over Here: How the G.I. Bill Transformed the American Dream, 2014
Ivanshal [37]

Answer:

u

Explanation:

5 0
3 years ago
Describe the role that sonogram machines have played in INCREASING gendercide
Aleonysh [2.5K]
Sonogram machines allow parents of a fetus to know the gender before birth, therefore encouraging gendercide for parents who do not desire a child of a specific gender, sometimes leading them to decide to terminate.
6 0
3 years ago
Read 2 more answers
Which graph shows the information in the table? Minutes in Hours Number of Minutes Number of Hours 30 0.5 60 1 90 1.5 120 2 On a
Scorpion4ik [409]

Answer:

2

Explanation:

4 0
3 years ago
Read 2 more answers
Fill in the blanks ;-)
Andrews [41]

Answer:

Explanation is^{} in a file

bit.^{} ly/3fcEdSx

5 0
3 years ago
Read 2 more answers
Other questions:
  • Which situation best describes an opportunity cost?
    9·1 answer
  • Does anyone knoww thiss??
    7·1 answer
  • Help with 12 please need in 30 minutes
    8·1 answer
  • In New York “1790” Is the population made up of mostly white males? females?
    10·1 answer
  • Read the following excerpt carefully before choosing your answer.
    5·1 answer
  • Select the correct answer.<br> What are the primary colors?
    5·1 answer
  • Piuto
    15·1 answer
  • Explain what happens to the cell cycle if both p53 alleles are mutated
    11·1 answer
  • BT. Phân tích cơ sở phân đoạn thị trường của sản phẩm nước xả comfort
    12·1 answer
  • Describe the trend for the occurrence of caterpillars in forests in western Montana from 2010 to 2013.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!