← Back to team overview

compscibuntu team mailing list archive

Re: [Question #45119]: C++ question

 

Question #45119 on Computer Science Ubuntu changed:
https://answers.launchpad.net/compscibuntu/+question/45119

1gurucoder proposed the following answer:
double powerTo(double First, int Second)
{
    double temp;

    if(Second<0)
         return 0;
    
    for(int i = 1; i <= Second; i++)
          temp = First * First;

     return temp;
}

-- 
You received this question notification because you are a member of
Computer Science Ubuntu, which is an answer contact for Computer Science
Ubuntu.