Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 17 Online
OpenStudy (anonymous):

problemset 3 problem 1 recursive i dont understand how do to this problem because it seems paradoxical, you must define a count at 0, but when you go back to the base case, the program resets the count. could someone explain an alternative way for this problem or a way around this? my code: http://dpaste.com/718101/

OpenStudy (anonymous):

For the first problem, you can pass a hidden argument to the recursive function and it will count okay, check: http://codepad.org/aTGMRw3n There is a minor catch in writing the code this way, see if you can solve it. Are you having other problems understanding the problem set? :-)

OpenStudy (anonymous):

http://codepad.org/nJDzYSlA

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!