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

“I read my notes, what else can I do?” This is an example of active studying. True or false Answer: False
A sheet cake and a birthday cake are both made from the same batter. The sheet cake is in the shape of a rectangular prism that is 12 inches long. 9 Inches wide
Which aspect does a light year measure? O distance O speed O curvature of space O time
Part A Directions. Answer each of the following questions. 1. On a train ride cross-country, the trees, buildings, and people appear to be speeding by the windo
#18 Choose the correct code assignment for the following scenario: 77-year-old with TB of the right knee. A. A18.01 B. A18.02 C. A18.03 D. A18.09
can someone help me please
Calculate the voltage difference in a circuit that has a resistance of 24 Ohms if the current is 0.50A. Use the formula I= V/R.
60-minute television program 25%of the Time is used for commercials and 5%credits
Please Help!! Brainiest!!
The dung cannon fungus has what unique characteristic?.