jasonspade
jasonspade jasonspade
  • 05-07-2022
  • Computers and Technology
contestada

Use pseudocode to write a function or procedure that will find the maximum of three numbers a, b, and c.

Respuesta :

aasanija aasanija
  • 05-07-2022

Answer:

Check if a > b

   if true -> check if a > c

        if true -> a has the maximum value

        if false -> c has the maximum value

   if false -> check if b > c

        if true -> b is the maximum

         if false -> c is the maximum

Explanation:

To find the maximum, you need to find the largest number.

This can be done by making multiple nested if-statements, comparing 2 variables and finding which one is larger.

Answer Link

Otras preguntas

Todd swam his race in 26.785 seconds while Frank swam his race in 29.07 seconds. What was the difference in their times? A. 2.185 seconds B. 2.285 seconds C.
pls help me to do these quickly​
5^5=75+30 TRUE OR FALSE p.s. if this gets deleted ama demolish u
What is cell division? What's another name for cell division?
Which of the following is the poorest conductor of electricity? Calcium (Ca) Silicon (Si) Fluorine (F) Sodium (Na) Cobalt (Co)
Burning match in physical or chemical change and why
Which is the correct algebraic expression for the phrase: 13 times the cost of one ticket and an $8 soda
What is the name of the symbol represented by three dots (...)?
What is the Range13,23,34,6,13,10,26,28,20,17​
What are the benefits of using an isometric sketch to communicate a design?