Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Question 18 3 pts List all elements of the language L3 = {a": n

Answered: 1 week ago

Question

Proficiency with Microsoft Word, Excel, PowerPoint

Answered: 1 week ago

Question

Experience with SharePoint and/or Microsoft Project desirable

Answered: 1 week ago