Recursive function.
#9

Quote:
Originally Posted by Vince
View Post
That seems incredibly counterproductive. As far as I can tell, all that functions does is raise a number to the power of n, which is indeed better done in a loop.
I just followed a pseudocode, which was supposed to be written good, therefore I tested it, I know there are better methods, I think my teachers are a bit drunk cause I've discovered a while back, in a class .pdf that they added a function to sum up 2 numbers, creating a new variable, using a loop, incrementing that variable, and then returning 1! It was just pathetic considering the "return x + y;" which could've been used ...
Reply


Messages In This Thread
Recursive function. - by Zh3r0 - 04.12.2014, 10:49
Re: Recursive function. - by Smithy - 04.12.2014, 11:21
Re: Recursive function. - by Zh3r0 - 04.12.2014, 11:33
Re: Recursive function. - by KingHual - 04.12.2014, 11:50
Re: Recursive function. - by Zh3r0 - 05.12.2014, 05:19
Re: Recursive function. - by DaTa[X] - 05.12.2014, 05:29
Re: Recursive function. - by Zh3r0 - 05.12.2014, 06:34
Re: Recursive function. - by Vince - 05.12.2014, 06:43
Re: Recursive function. - by Zh3r0 - 05.12.2014, 07:23
Re: Recursive function. - by Smithy - 05.12.2014, 08:14

Forum Jump:


Users browsing this thread: 2 Guest(s)