time

Apr 26, 2016 at 3:31am
is not real, i am from the future
Last edited on Apr 27, 2016 at 2:35am
Apr 26, 2016 at 6:35am
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 Apr 26, 2016 at 6:41am
Topic archived. No new replies allowed.