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

Which book was a compilation of chinese poems and folk songs?
urbanization to europe in the middle ages resulted in the
What is the most important signle tax finnacing texas government?
El texto de comparación debe ser ________. escrito en inglés escrito sin fuentes un texto de comparación y contraste un texto de dos párrafos
Oscar and Julie Ashton are celebrating their 15th anniversary by having a reception at a local reception hall. They have a budgeted $2,500 for their reception.
Help I need answers
Was a term for wealthy, young urban professionals of the 1980s.
Which has a higher osmotic pressure 1.0 m sucrose or water?
Mikes cell phone plan is $50 per month plus $0.10 per text message for each message over 250 messages. If Mikes cell phone bill is $112, how many extra text mes
what effects did the development of railroads have on industrial growth