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
zmey [24]
3 years ago
6

private int product(int n) { if(n <= 1) return 1; else return n * product(n-2); } What is the output when product(6) is calle

d?
Computers and Technology
1 answer:
sergeinik [125]3 years ago
7 0

Answer:

48

Explanation:

In this code, there is a method i.e "product" of "int" type it means it returns the integer value. The description of the given code is given below

  • Initially when product(6) function is called the else block will be executed so return(6)*product(4).
  • As we saw that above product(4) is a recursion function " Function which calls itself again and again " . so again else block is executed now the value is return(6)*return(4) *return(2);

So it returns 48

You might be interested in
What role does the automated surface observing system.
Ilya [14]

Answer: The ASOS systems serves as the nation's primary surface weather observing network. ASOS is designed to support weather forecast activities and aviation operations

6 0
2 years ago
Read 2 more answers
In a non-price rationing system, consumers receive goods and services first-come, first served. Give me an example of a time whe
Anna35 [415]

When someone may be giving away something for free.

7 0
2 years ago
true of false one reason to move to a paperless society is that printers are becoming prohibitively expensive
Yakvenalex [24]
True because printers, which require paper, are becoming more expensive. A paperless society has the advantage of being cheaper in this aspect.
5 0
3 years ago
Which of the following is normally mutually exclusive<br> Read only files<br> Printer<br> WIFI
marin [14]

Answer:

the answer is going to be printer

5 0
2 years ago
What is the difference between building a table in word and excel
Anastasy [175]

Answer:

 The main difference between creating a table in word and excel is that there are more number of table tool and the layout section in the excel as compared to the MS word.

Creating a table in word or excel are only depend on the requirements of the particular table. If there is less number of calculations in the table then, it is easy to create the table in word as compared to excel.

And if we want to create a table with maximum numbers of rows and column and also contain high math calculation then, it is good to create in excel.

7 0
3 years ago
Other questions:
  • Two electronics students are discussing electrical units. Student A says that electrical power is measured in units called coulo
    5·1 answer
  • Create a function named first_a that uses a list comprehension. The function will take a single integer parameter n. Find every
    13·1 answer
  • What is runtime error in Python? Provide an example
    14·1 answer
  • What is a seismogram?
    9·1 answer
  • Complete the paragraph describing characteristics of an audio mixer
    8·2 answers
  • ) What is the ""Phantom Inspector""? (
    12·1 answer
  • Why hackers hack?? in other people?​
    8·2 answers
  • Discuss how sentiment analysis works using big data?<br>​
    13·1 answer
  • Who plays warzone im a roze sweat and ill try to carry with loadout
    10·1 answer
  • What is the name for data generated by a computer using an algorithm?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!