Ask your own question, for FREE!
Computer Science 11 Online
OpenStudy (anonymous):

Here is a function that prints all the integers in reverse order until 0 starting with the value in variable 'a. function countdown(integer a) { while (a > 0) { print( a ) a = a - 1 } } Rewrite this same function using recursion. Hint: remember that a recursive function is one defined in terms of itself. Here is a way of defining countdown recursively: Printing a countdown from any integer is the same as printing just that integer and then printing a countdown starting with the next smaller integer, until you reach 0. HELP??

OpenStudy (anonymous):

what programming language is this?it's not c, c++ java or python...

OpenStudy (rsmith6559):

A recursive function to reverse a collection is a good project to learn recursion. Remember that the recursion "unwinds" after it reaches the base case.

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!