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]
4 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]4 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
Describe three different methods to solve x²- x - 56 =0
Vika [28.1K]
Methods: 1) Factoring 2) Complete the square 3) Quadratic form
5 0
3 years ago
What's bigger 5/8 or 6/9
olga_2 [115]
6/9 is bigger than 5/8
6 0
3 years ago
Read 2 more answers
Exponent laws and pythagorean theorem quiz
Vikentia [17]

Answer:

12.2

Step-by-step explanation:

A^2 + B^2 = C^2

(7)^2 + (10)^2 = (C)^2

49 + 100 = C^2

149 = C^2

sqr(149) = C

12.2 = C

6 0
3 years ago
Which of the following sets refer to vertical angles from the diagram?
natita [175]

Answer:

The correct answer to the question is:

∠BOF and ∠HOD

Step-by-step explanation:

Both of the sets of angles are vertical.

4 0
3 years ago
Which statement about the angle measure is true
Delicious77 [7]

Answer:

D

Step-by-step explanation:

each angle of the triangle is 95° and the second angle has to be in alphabetical order

8 0
4 years ago
Other questions:
  • Complete factoring<br><br> 3y+30=3( )<br><br> can someone explain this to me
    13·1 answer
  • The ratio 15:60 in simplest form
    6·2 answers
  • If the mean of five values is 64, find the sum of the values.​
    8·1 answer
  • In the diagram below, AngleDAB and AngleDAC are adjacent angles. Lines A B, A D, and A C create two angle. The space between lin
    5·1 answer
  • Which statement describes the equation below?
    11·1 answer
  • The number of words Jenna can say varies directly as the time. Jenna can say 392 words in 2 minutes.
    13·1 answer
  • Solve the following equation for y <br><br>x+y=3​
    12·2 answers
  • There are five different colours and two different numbers. The colours are red, yellow, blue, green and black. The numbers are
    11·1 answer
  • A cone-shaped tent has a diameter of 12 ft and a height of 6 ft. What is the approximate volume of the tent? Use 3.14 for π.
    6·1 answer
  • Which expression has a value of 13?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!