Question: Write a recursive function print that, given an integer number p > 0, prints counting forward from 1 up to that number. For example, if
Write a recursive function print that, given an integer number p > 0, prints counting forward from 1 up to that number. For example, if p = 5, the output should be 1 2 3 4 5 Write all numbers on the same line separated by spaces. If the input is 0, the function should produce no output. If the input is negative, inform the user by writing the message "Invalid input". End with a new line. Zero points will be given if your solution does not use Recursion #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
