1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mixer [17]
3 years ago
15

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
1 answer:
JulsSmile [24]3 years ago
5 0

Answer:

def max_magnitude(user_val1, user_val2):

if abs(user_val1) > abs(user_val2):

return user_val1

else:

return user_val2

if __name__ == '__main__':

n1 = int(input("Enter the first integer number: "))

n2 = int(input("Enter the second integer number: "))

print("The largest magnitude value of", n1, "and", n2, "is", max_magnitude(n1, n2))

Explanation:

You might be interested in
oftware that is free and whose code can be accessed and potentially modified by anyone is referred to as _____. shared source fi
ad-work [718]

Answer:

open source software

Explanation:

A software that is free and whose code can be accessed and potentially modified by anyone is referred to as an open source software. The license used by the developer of an open source software grants all users the permission to use, distribute and modify the software at any time.

Some examples of an open source software are Firefox, gimp, OpenOffice etc.

8 0
3 years ago
Select the correct answer.
Nataly [62]

Answer:

B. is grayed out

Explanation:

ALL HIDDEN FOLDERS > GRAYED OUT

7 0
3 years ago
Data ________ is important because it establishes an organization's rules for sharing, disseminating, acquiring, standardizing,
photoshop1234 [79]

Data protection policy is important because it establishes an organization's rules for acquiring, standardizing and disseminating data.

<h3>What is Data protection policy?</h3>

These are policies adopted by organizations that help to ensure data is adequately protected.

When data isn't protected , it could get to the hands of criminals which could use it for different types of cybercrime and also to ensure compliance with data protection laws in the country.

Read more about Data protection policy here brainly.com/question/26493645

3 0
2 years ago
Which statement will remove 5:'softball' from the dictionary?
dimaraw [331]

Answer:

sports.pop(5)

Explanation:

edg 2020

4 0
3 years ago
Read 2 more answers
What is the benefit of an intranet?
garik1379 [7]

Answer:

1. Access and share internal information quickly and safely

Explanation:

8 0
3 years ago
Other questions:
  • _____ is published by the U.S. Bureau of Labor Statistics. It provides up-to-date career outlook information. It is no longer av
    15·2 answers
  • Members of which generation were born after the turn of the millennium?
    11·1 answer
  • Given a int variable named calls Received and another int variable named operators On Call write the necessary code to read valu
    14·1 answer
  • Which education level has the highest return on investment (ROI)? AHigh School Diploma BROI is equal for all of the above. CSeni
    6·1 answer
  • what are the Technologies in regarding of communication technology? Please help me I'll rate you as brainliest!​
    13·1 answer
  • Questions to ask people on how corona has affected the religion sectors​
    10·1 answer
  • What is the condition for setting an alarm clock
    11·1 answer
  • Need answer ASAP. I’ll mark brainliest if correct
    7·1 answer
  • Who is the owner of apple company??​
    13·2 answers
  • Electronic hacking and illegal trespassing for the purposes of acquiring a competitor’s proprietary information is considered.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!