Recursion

19.3 - Recursion basic 3


Your task is to make the reverse of the previous exercise, a function called count_up which accepts an integer and prints from 1 to that number.

Sample input code

int main() {
    count_up(5);
}

Sample output

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