Write a function max_magnitude() with two integer input parameters that returns the largest magnitude value. Use the function in a program that takes two integer inputs, and outputs the largest magnitude value.
Ex: If the inputs are:
5 7
the function returns:
7
Ex: If the inputs are:
-8 -2
the function returns:
-8
Note: The function does not just return the largest value, which for -8 -2 would be -2. Though not necessary, you may use the absolute-value built-in math function.
Your program must define and call a function:
int MaxMagnitude(int userVal1, int userVal2)
code------------------------
#include
using namespace std;
/* Define your function here */
int main() {
/* Type your code here */
return 0;
}
Computers and Technology
Views: 0 Asked: 02-11 09:56:02
On this page you can find the answer to the question of the computers and technology category, and also ask your own question
Other questions in category
- Which of the following is not true about Mac computers? The current version of OS X is called El Cap...
- How does communication increase engagement​
- What kind of cable would you use to connect endpoint devices and infrastructure devices in a local a...
- Should variable names have logical identifier to provide some sort of context for what they will sto...
- You need a(n) _____ to play an mp3 audio file on a desktop or laptop computer...
- Personal information in the computer can be viewed and stolen...
- Choose all items that represent characteristics of a work samples....
- Hat is the limit of virtual machines that can be connected to a virtual network?...
- If you are inviting more than one person to a meeting, you can use a(n) _____ to separate the email ...
- Which type of GUI control would be best to use if you wanted the user to select one date from a list...