Question: Write a C++ program using recursive function to display number in ascending and descending order. You have to write two (2) recursive functions one for

Write a C++ program using recursive function to display number in ascending and descending order. You have to write two (2) recursive functions one for ascending another for descending. The program ask the user to enter a positive number from 1 to 20 and the program will out numbers in ascending and descending from 1 to the number user entered.

Sample Output:

Enter a positive number between 1 and 20> 10

Ascending: 1 2 3 4 5 6 7 8 9 10

Descending: 10 9 8 7 6 5 4 3 2 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!