Question: Having some trouble, need help: Create a program that will do one of two functions using a menu, like so in c++ 1. Do Catalan

Having some trouble, need help:

Create a program that will do one of two functions using a menu, like so in c++

1. Do Catalan numbers

2. Do Fibonacci numbers (recursive)

0. Quit

Enter selection: 1

Enter Catalan number to calculate: 3

Catalan number at 3 is 5

1. Do Catalan numbers

2. Do Fibonacci numbers (recursive)

0. Quit

Enter selection: 2

Enter Fibonacci number to calculate: 6

Fibonacci number 6 is 8

In C++, Create a function of catalan that will take a parameter and return the Catalan number. Also create a function of Fibonacci that will take a parameter, calculate using recursion the Fibonacci number and return the number.

Main will have a do/while loop that will print the menu, enter the selection, and call the functions. Have it quit on 0.

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!