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
Irina-Kira [14]
3 years ago
6

Write a recursive method int power(int i, int j which determines teh result of i^j where j>=0

Computers and Technology
1 answer:
Afina-wow [57]3 years ago
6 0
Int power( int i, int j )
{
   if( j == 0 )  // base case
       return( 0 );
   return( i * power( i, j -1 ) );
}
You might be interested in
How does a Cloud-first strategy approach a client's migration to the Cloud?by removing outside ecosystem partners from the Cloud
belka [17]

Cloud-first strategies are <em>operating methods</em> wherein teams move all or most of their infrastructure to <em>cloud computing systems</em><em>  </em>such as Web Services, and the further discussion can be defined as follows:

  • It stores assets, including quest and <em>secure resources</em>, in the cloud rather than employing <em>physical resources</em> including such server clusters.
  • This approaches a client's migration to the <em>Cloud by integrating multiple services </em>together to serve the client's business needs.

Therefore, the final answer is "Last choice".

Learn more:

brainly.com/question/1256812

3 0
3 years ago
Which of the following was the most significant impact the phonograph had on the recording arts industry?
liraira [26]

Answer:

The phonograph led to mass distribution of recordings.

Explanation:

I just took this assignment. :)

4 0
3 years ago
Read 2 more answers
Why does dns use udp instead of tcp? if a dns packet is lost, there is no automatic recovery. what are the consequences?
inysia [295]
<span>If a DNS packet using UDP is lost this problem must be handled at the application layer. If an answer is not received after some period of time the specific application may choose to resend the DNS query. I can go much more into detail but this should answer your question. If you need more detail just ask.</span>
6 0
3 years ago
Two numbers are given (numbers are entered from the keyboard). If both numbers are positive, then output their sum, if both numb
AleksAgata [21]

Answer:

The program in Python is as follows:

num1 = int(input())

num2 = int(input())

if num1 >=0 and num2 >= 0:

   print(num1+num2)

elif num1 <0 and num2 < 0:

   print(num1*num2)

else:

   if num1>=0:

       print(num1**2)

   else:

       print(num2**2)

Explanation:

This gets input for both numbers

num1 = int(input())

num2 = int(input())

If both are positive, the sum is calculated and printed

<em>if num1 >=0 and num2 >= 0:</em>

<em>    print(num1+num2)</em>

If both are negative, the products is calculated and printed

<em>elif num1 <0 and num2 < 0:</em>

<em>    print(num1*num2)</em>

If only one of them is positive

else:

Calculate and print the square of num1 if positive

<em>    if num1>=0:</em>

<em>        print(num1**2)</em>

Calculate and print the square of num2 if positive

<em>    else:</em>

<em>        print(num2**2)</em>

3 0
3 years ago
Jamie is not sure a new medication will work because it has not had a large test group. Is Jamie being creative?
Mumz [18]
No, they're being skeptical.
4 0
3 years ago
Read 2 more answers
Other questions:
  • How can ASCII be used to represent characters in a computer system?
    15·1 answer
  • Which tab is used to configure an export to PST in Outlook 2016?
    7·2 answers
  • When choosing a new computer to buy, you need to be aware of what operating it uses.
    12·1 answer
  • The World Wide Web (not the Internet) went live in this decade:
    8·2 answers
  • Suppose you have four 500 MB hard drives plus one 2 GB flash drive. How many GB of capacity is this overall?
    12·1 answer
  • kieran wants to search a database quickly for information on the last time a patient came to his medical facility.The informatio
    14·2 answers
  • Write a program that grades the written portion of the driver's license exam. The exam has 20 multiple choice questions (answers
    10·1 answer
  • Identify the equation that translates Y = In(x) five units down.​
    8·1 answer
  • How long does it take to go 80 miles if you are going 80 mph?
    8·2 answers
  • 2. What are the 3 Alternative software programs that can be used if you don’t have the Microsoft Office programs?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!