time

is not real, i am from the future
Last edited on
Hello! The document seems to be protected. I requested for permission.
Why are you returning the name of the function? You have to return the output of the function to the caller :
1
2
3
4
5
6
7
int power(int number, int raise)
{
    int result = number;
    for(int i = 0; i < raise - 1; i++)
          result = result * number; // this happens "raise - 1" number of times times
    return result;
}
Last edited on
Topic archived. No new replies allowed.