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??
what programming language is this?it's not c, c++ java or python...
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.
Join our real-time social learning platform and learn together with your friends!