Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In c++ You are to create a program which has four functions: A main function (the default template is OK) A menu function which requires

In c++ image text in transcribed
You are to create a program which has four functions: A main function (the default template is OK) A menu function which requires no parameters be sent to it and one char value to be returned (to the main function) A remainder function which requires two parameters be sent to it and one (numeric value) to be called by and returned to the main function. A factorial function which requires one parameter be sent to it and one (numeric value) to be returned to the main function (or not - your choice) This should mimic your project. The first command is to call the menu function (from the main function) and get the user's (legal) choice. The menu function should stay in a loop until the user (in the menu function) selects a returnable option. When that option to quit is returned to the main function, the program is over: i.e. return 0. The menu function returns the (char) option chosen. The legal options available are the option to quit, the option to find the remainder of two integers, the option to find the factorial of a number (three options in total). The menu function should determine if the user's choice is legal or not. If the choice is not legal, it should require that user remain in the menu function. If it is legal, the menu function should return the option choice (this should be a letter) to the main menu. The user's choice returned to the main menu should cause the main menu to either quit the program or call one of the two remaining functions. Before calling these functions, the user should be prompted for the integers the user would like passed to the functions: two for the remainder, but only one for the factorial (don't ask for the second integer if it is not required). The main function should repeat this procedure until the user indicates that s/he wants to quit. You will not be able to use the internet, the class slides, your phone, a calculator or any other additional material. Each of you screens will be promoted on to my screen, and I will be watching. Good luck

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago