Question: Rewrite Previous Programming Assignment found ( BELOW ) so that it utilizes functions . You will need at least 4 functions that are called by

Rewrite Previous Programming Assignment found (BELOW) so that it utilizes functions. You will need at least 4 functions that are called by main: menu, summation, factorial, and exponential. The functions operate as follows: int menu() displays the menu and prompts for the user's choice and returns that choice. void summation() prompts the user for their integer and then does the summation and the displays the result. It is passed nothing and returns nothing. void factorial() is same as summation void exponential is same as summation - make sure to use for loops to do the calculations and not pow or exp. Each function should have it's own header block. It should state the name of the function, the purpose of the function and what it is passed or what it returns. These header blocks are created using comment lines within your code. Rule #1: Absolutely no global variables. Variables used only inside of a function should be declared locally to that function. For example, if you have a counter variable down in Summation, then declare it locally to Summation. OR, if main() needs to know what choice the user made from the menu, then the function menu() returns that value. No global variables under any circumstances. Same input validation requirements as when you submitted for previous code from (BELOW). VISUAL BASIC C++

PREVIOUS ASSIGNMENT CODE;

Rewrite Previous Programming Assignment found (BELOW) so that it utilizes functions. You

Pseudocode for the main function might look like this: (I underlined a few side comments for you - but they are not part of the p-code.)

will need at least 4 functions that are called by main: menu,

#include "stdafx.h" sumnationcounter; include using namespace std; /Result display cout End) break; cout

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!