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
USPshnik [31]
3 years ago
5

Complete the recursive function raisetopower(). ex: if userbase is 2 and userexponent is 4, then raisedvalue is assigned with 16

(i.e. 2^4). note: this example is for practicing recursion; a non-recursive function, or using the built-in function pow(), would be more common.
Computers and Technology
1 answer:
lesya [120]3 years ago
6 0
Using the property that x^n is x*x^(n-1) you can write a recursive function:

double raisetopower(double x, int n)
{
   if (n <= 0) {
      return 1.0;
   }
   return x*raisetopower(x, n - 1);
}

Note that this crude implementation does not deal with negative or fractional exponents. But it shows recursion.

You might be interested in
What are several different types of software, which sit in the middle of and provide connectivity between two or more software a
brilliants [131]

Answer:

The answer to the given question is the option "a".

Explanation:

In this question, the answer is "middleware" software because this software works between the operating system and the applications that provide connectivity to two or more software applications. for example database, application server, etc and other choices that are not correct can be described as:

  • In option b, The integration middle wear represents the software of the system. It does not coordinate between operating and application software.
  • In option c, It is used to manage the data and the information for the process.
  • In option d, It includes the hardware, software and the networks. In this hardware and software link for use software.

That's why the answer to this question is the option "a".

6 0
3 years ago
How many conditions are needed in a while loop that should run until a user guesses the correct number or until they have made f
Sonja [21]
<h2>[] Hello! []</h2>

Answer:

2

Explanation:

MS Coding 1 A ED

---------------------------------------------------------------------------------------

  • I hope this helped
  • Brainilest appreciated!
7 0
3 years ago
What is the famous saying among computer programmers?
USPshnik [31]
The famous saying is garbage in , garbage out .
3 0
3 years ago
What can you create best in Word Online?
RUDIKE [14]

Answer: USE GOOGLE CHARTS

Explanation:

5 0
3 years ago
Read 2 more answers
Toshiba Corporation makes computer chips. Toshiba Corporation would be classified as a A. merchandising company. B. manufacturin
solmaris [256]

Answer: Option 'B'

Explanation: They will be referred to as a manufacturing company because of they make the necessary part themselves not buy it from somewhere else.

5 0
3 years ago
Other questions:
  • Software license infringement is also often called software __________.
    11·2 answers
  • CALL NOW $+1-855-241-6569$ aol mail not working on windows ## aol desktop gold email not working||USA||**2020*
    7·1 answer
  • Online Book Merchants offers premium customers 1 free book with every purchase of 5 or more books and offers 2 free books with e
    5·1 answer
  • Fill in the correct term to complete the statement. _____ refers to borrowing money from a bank.
    13·2 answers
  • (4 points.) Write an algorithm (i.e., step-by-step instructions) via which someone could walk or drive from some origin to some
    8·1 answer
  • Question 1 of 20 Gus has decided to organize his inbox on June 26 by using folders and deleting irrelevant messages. He creates
    14·2 answers
  • The concept of "plug and play" is demonstrated by which of the following<br> scenarios?
    13·1 answer
  • Which structures protect the cell? Select two options.
    8·1 answer
  • What are the functions of information technology?
    9·1 answer
  • _____ is a higher-level, object-oriented application interface used to access remote database servers
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!