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
vesna_86 [32]
3 years ago
9

Describe an algorithm that produces the maximum, me- dian, mean, and minimum of a set of three integers. (The median of a set of

integers is the middle element in the list when these integers are listed in order of increasing size. The mean of a set of integers is the sum of the integers divided by the number of integers in the set.)
Mathematics
1 answer:
zheka24 [161]3 years ago
5 0

Answer

The mean of three numbers x1,x2,x3 can be obtained by a calculus. The first step of the algorithm is

1) mean(x1,x2,x3) = \frac{x1+x2+x3}{3}

In order to obtain the median, maximun and minumun of x1, x2 and x3, we can compare x1 and x2. The smaller of those numbers will be compared to x3 and, if x3 is even smaller, then x3 is the minimun, the other small number is the median, and the remaining number is the maximun. Otherwise, we compare x3 with the bigger number to find median and maximun. To summarize:

2) compare x1 with x2. The bigger of the two numbers will be called '<em>s</em>' (for  small) and the smaller will be called '<em>b</em>' (from big).

3) compare x3 with <em>s</em>. The smaller of this subset will be the minimun of the entire set of 3 elements.

4) Check if x3 is the minimun, in that case, <em>s </em>is the median, because <em>s</em> is between x3 and <em>b. </em>We also conclude that <em>b</em> is the maximun

5) if x3 in not the minimun, then compare it with <em>b.</em> The bigger element between the two of them will be the maximun of the set, and the smaller one will be the median.

I hope it helps you!

You might be interested in
If y is directly proportional to x and y = 17.5 when x=21 find y when x=39
morpeh [17]

direct proportion y=kx , k is constant and k does not equal to 0.

17.5=k(21)

k=5/6

when x =39

y=5/6 ×39

y=32.5

4 0
3 years ago
Read 2 more answers
Which number does NOT represent a rational number
defon

Answer:

Step-by-step explanation:

B is not rational. B = sqrt(3*3 * 2 * 5) = 3 sqrt(10)   sqrt(10) is irrational.

8 0
3 years ago
Read 2 more answers
1. One liter is equal to 1,000<br> milliliters. How many liters are<br> equal to 18,045 milliliters?
aksik [14]

Answer:

18.045

Step-by-step explanation:

because you will have 18liters and because of 045 you would let it stay the same and instead of a coma you would put a period.

hop this helps

4 0
2 years ago
Michael needs at least $200 to buy airpods. He already has $50. If he saves $15 each week, how many weeks will it take for Micha
DerKrebs [107]

Answer:

it will take him 3 weeks to reach is goal.

Step-by-step explanation:

if michael needs $200 and he already has 50 then 200-50 is 150. then you divide 150 divided by 15 to get 3

hopethis helped.

3 0
3 years ago
Oliver had $50 on the day before his birthday. After he recived some money for his birthday , he had $75. Write and solve eqauti
Doss [256]

Answer:

X=25

Step-by-step explanation: 25+50=75


3 0
4 years ago
Other questions:
  • june has a set of folding chairs if she arranges the chairs in 5 rows of the same length she has 2 left over if she arranges the
    10·1 answer
  • The graph shows the relationship.....
    13·1 answer
  • Explain why i got it wrong? How to get the right answer?
    14·2 answers
  • How much is a 10% tip on a $25 bill
    13·2 answers
  • Seven less than one-third of a number is 5
    13·1 answer
  • I did some of it already I just need help on the last one unless I got the others wrong
    10·2 answers
  • Classify the triangle by its sides. The diagram is
    5·2 answers
  • 6. A graph with a<br> slope decreases from left to right.
    13·2 answers
  • Write the equivalent expression to the sum of the expressions 3a2 + 3a and -3a - 3a2
    6·1 answer
  • PLEASE HELP 50 PTS!! In algebra, we use systems to organize information about a situation in an efficient way.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!