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

What is the radius in centimeters of a circle that has a circumference of 16 centimeters
A model of the solar system showing the planets moving in perfect circles along circular orbits is called what
Why is soda considered bad for your teeth, particularly if you don't brush regularly?
Oranges have hundreds of seeds. What does this tell us about their pollination? (2 points
Which group of fish do scientists believe amphibians evolved from? A. jawless fish B. cartilaginous fish C. bony fish D. lancelets
Dew is formed when small water droplets condense on grass. In what type of environment is dew NOT likely to form?
How does the digestive system work with other systems to keep you healthy?
in "The Egg," where does the narrator's family start a restaurant
Your central idea is a statement that captures in a single sentence
Grass and fruit trees are not living organisms. true or false