Recursion

19.2 - Recursion basic 2


Your task is to create a recursive function called count_down which accepts an integer and prints from the number to 1.

Sample input code

int main() {
    count_down(5);
}

Sample output

5
4
3
2
1
#include <iostream> void count_down(int n) { }