YarionNeethugher YarionNeethugher
  • 19-03-2017
  • Computers and Technology
contestada

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

Respuesta :

rsmith6559
rsmith6559 rsmith6559
  • 23-03-2017
int power( int i, int j )
{
   if( j == 0 )  // base case
       return( 0 );
   return( i * power( i, j -1 ) );
}
Answer Link

Otras preguntas

si matas a un zombie es un muerto mas o un muerto menos????????
What is used to classify volcanoes based on the strength of their eruptions?
The three-part system of the U.S. government allows for a system of checks and balances.
select the code requirements when it is located in a crawl space You may select more than one.​
Capital flight The following graphs depict the market for loanable funds and the relationship between the real interest rate and the level of net capital outflo
Describe the formation of a hot spot? Please help!
Ben is a successful salesperson with Victor International Inc.He sells capital goods to large industries.He is expected to give a presentation to a client for a
Can anyone help? If f(x)=3^x, prove that f(x) + f(x+1)= 4f(x)
explain computer coding in an understandable manner​
Solve the following complex equation 18+22i=3x-2yi