#include "Voids.h" #include using namespace::std; void FindDigitAtPosition(int Digit, int Position, int& Number) { cout << "\nThe number you have chosen from before is " << Number << ", what position of that number do you want to see where that digit is outputted?\n"; cin >> Position; } //the variable that holds the menue choice. pass by value. //the variable that holds the number entered. pass by reference //return: none //purpose: this function will call the appropriate function based upon the menu choice that is passed in void ProcessMenuChoice(float Choice) { cout << "Enter the number corresponding to the function you want to select:\n"; cin >> Choice; } //the integer entered by the user //purpose: this function will allow the user to enter the number to be tested. //limit the input from negative one million to positive one million. //if out of bounds, display an error message and re-prompt void GetData(int& Number) { cout << "\n-----Input a number between negative one million and one million to be tested-----\n"; cin >> Number; while (Number > 1000000 || Number < -1000000) { cout << "\nYou did not enter a number in between the designated values, try again: \n\n" << endl; cin >> Number; } cout << "\nYou entered the value: " << Number << endl; } //the variable that holds the number entered. pass by value //return:none //purpose: this function tests the number that is passed to determine whether it is odd, even, or 0. //the function displays the appropriate message based upon the results of the test void IsOddEven(int& Number) { cout << "\n\nCalculating if the number entered is even, odd, or 0\n\n"; if (Number % 2 == 0 && Number != 0) cout << Number << " is even.\n\n"; else if (Number % 2 == 1 && Number != 0) cout << Number << " is odd.\n\n"; else if (Number == 0) cout << "This number is a 0.\n\n"; }