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
Indirect materials include ______. multiple choice question.
Natasha2012 [34]

Factory rent and insurance.

<h3>what is Indirect material?</h3>
  • Indirect materials are goods that, while part of the overall manufacturing process, are not integrated into the final product.
  • For example, disposable gloves, personal protective equipment, tape, etc

To learn more about it, refer

to brainly.com/question/25689052

#SPJ4

8 0
1 year ago
Which two related organizations are responsible for managing the top-level domain name space and the root domain name system (dn
juin [17]

I guess the correct answers are,

IANA (Internet Assigned Numbers Authority)

ICANN (Internet Corporation for Assigned Names and Numbers)

Thе Intеrnеt Assignеd Numbеrs Authοrity (IANA) is a functiοn οf, a nοnprοfit privatе Amеrican cοrpοratiοn that οvеrsееs glοbal IP addrеss allοcatiοn, autοnοmοus systеm numbеr allοcatiοn, rοοt zοnе managеmеnt in thе Dοmain Namе Systеm (DNS), mеdia typеs, and οthеr Intеrnеt Prοtοcοl-rеlatеd symbοls and Intеrnеt numbеrs.

Thе Intеrnеt Cοrpοratiοn fοr Assignеd Namеs and Numbеrs (ICANN /ˈaɪkæn/ ЕYЕ-kan) is a nοnprοfit οrganizatiοn rеspοnsiblе fοr cοοrdinating thе maintеnancе and prοcеdurеs οf sеvеral databasеs rеlatеd tο thе namеspacеs and numеrical spacеs οf thеIntеrnеt, еnsuring thе nеtwοrk's stablе and sеcurе οpеratiοn.

6 0
3 years ago
2. A _______
miv72 [106K]

Explanation:

A computer is an electronic device that can store and proceda

7 0
3 years ago
Windows server 2012 r2 includes hyper-v in which edition(s)?
SashulF [63]
<span>The Standard and Datacenter editions.</span>
7 0
4 years ago
Es la propiedad fundamental de la materia que se manifiesta por la atraccion o repulsion entre sus partes
neonofarm [45]

Answer:

Привет! Кто-нибудь читал Криспину крест ведущего? Если да, то может ли кто-нибудь дать мне представление о том, как он изменился в этой истории! Спасибо за ваше время!

Explanation:

6 0
3 years ago
Other questions:
  • Describe a situation where it would be appropriate to use each of the six leadership styles described by Daniel Goleman
    7·1 answer
  • Inherent flaws in system software code are called:
    13·1 answer
  • Which system procedure is normally done with both hand valves opened on a gauge manifold connected to a refrigeration system?
    7·1 answer
  • QUICK! The commands available from a menu change depending upon what you are doing. True False
    10·2 answers
  • Which of the following is NOT a useful strategy when making an informed purchase ?
    7·1 answer
  • The instruction format of a computer is given by one indirect bit, opcode bits, register address bits, immediate operand bits an
    11·1 answer
  • What does this say in morse code?
    11·2 answers
  • Have you ever tried to learn a new language or do you have friends who've had that experience? What are some of the steps you wo
    10·2 answers
  • Can someone please help me I need to turn this in my 3:00pm Eastern time
    12·1 answer
  • A binary floating-poi Select 3 true statements about Python primitive types.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!