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 careers are most likely to require business skills
olchik [2.2K]

i would say maybe an accountant, entrepreneur, business reporter, or something like that.

8 0
3 years ago
How to represent derived attributes in database?
Vlad1618 [11]

Answer:

Derived attribute can be defined as a type of attribute where its value will be derived from one or more of the other attributes of the same entity set.

Explanation:

An example of derived attribute is when we have an entity set called General. The set then has attributes like [Form], [Characteristics], [Address}, (Employment No).

(Employment No) which is represented distinctly in the attribute set can be called a derived attribute if it can be derived from one or more of the other attributes.

Derived attribute can be gotten through calculating values and not storing values.

For example, let us consider the following record of Teachers records;

(‘Teacher Number’, ‘Name’, ’Date of Birth’, Age today)

(‘E105’, ‘Samson’, ’07-Dec-1990’, 0)

This record shows that the teacher Samson was born on 7th of December, 1990. At the time of record insertion, he was born and 0 years old. What will be the value of his age on ’07-Dec-2000’? It is about 10 years. It clearly shows that the value is not fixed and it is a variable whenever the DOB is adjusted.

Therefore, we are not creating our table with derived attributes in it. Instead, the values ofderived attributes can be calculated at the time of retrieval and shown to the user. Hence, the record will look like as follows;

(‘E105’, ‘Samson’, ’07-Dec-1990’)

This means that 0 is a derived attribute from the Date of birth.

7 0
3 years ago
​Harrison works at a nationally known grocery store chain. He is analyzing sales data from the past five years to determine whic
Galina-37 [17]

Answer:

Data scientist

Explanation:

Data scientist are those who work in the field of data science, which involves the study of data, developing methods of recording, storing, and analyzing data to effectively extract useful information and in this case Harrison is studying the past five years sales record(data) so as to determine which low-selling products should be discontinued.

7 0
4 years ago
I need help pls, in this code if add row for example :
tankabanditka [31]
I thing is going project experiment everyone make plans and
3 0
4 years ago
which of the following jobs typically requires an associate's degree? fashion merchandising retail clerk telemarketer purchasing
natulia [17]

Answer is: Purchasing manager

Explanation:


<u>What is an Associate's Degree? </u>

Associate degrees are simply two-year degrees. Although they can take longer or shorter to complete, depending on the pace of study, they are generally half the workload of a four-year bachelor’s degree. They are, therefore, about half the price of a bachelor’s degree, and sometime significantly cheaper than that because associate’s degrees are often provided by more affordable community colleges.

<u>Purchasing Manager Role:</u>

A Purchasing Manager is an employee within a company, business or other organization who is responsible at some level for buying or approving the acquisition of goods and services needed by the company. ... seeking reliable vendors or suppliers to provide quality goods at reasonable prices. negotiating prices and contracts.

Most employers prefer to hire purchasing managers with a four-year college degree. A business degree, especially with a focus in purchasing or supply management, is particularly useful. Another good combination is an undergraduate degree in a technical field and a master's degree in business administration.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Hi guys help me plz . How to get ios 10 zip file for android devices ? or how to port ios 10 or higher for htc one me ?
    11·1 answer
  • What is the advantage of using a subject directory like the public internet library ?
    11·1 answer
  • The chip that controls the radio frequency waves within a device
    9·1 answer
  • Value or power of a network grows exponentially as a function of the number of network members. this is known as ________ law.
    8·1 answer
  • Which of the following answers refers to a system containing mappings of domain names to various types of data, such as numerica
    15·1 answer
  • PLEASE HELP QUICKLY, I WILL GIVE BRAINLIEST TO THE BEST ANSWER!
    9·1 answer
  • What is the best way to set up the spreadsheet? List each expense in a row. List each income source in a column. List each expen
    15·2 answers
  • Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy.
    15·1 answer
  • What are the importance of rules in the computer lab ?​
    12·1 answer
  • 2.17.5 coders answers
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!