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
An angle of measure 120 degrees intersects the unit circle at point (-1/2,√3/2) What is the exact value of cos(120)
notka56 [123]

The exact value of cos120 if the measure 120 degrees intersects the unit circle at point (-1/2,√3/2) is 0.5

<h3>Solving trigonometry identity</h3>

If an angle of measure 120 degrees intersects the unit circle at point (-1/2,√3/2), the measure of cos(120) can be expressed as;

Cos120 = cos(90 + 30)

Using the cosine rule of addition

cos(90 + 30) = cos90cos30 - sin90sin30

cos(90 + 30) = 0(√3/2) - 1(0.5)

cos(90 + 30) = 0 - 0.5

cos(90 + 30) = 0.5

Hence the exact value of cos120 if the measure 120 degrees intersects the unit circle at point (-1/2,√3/2) is 0.5

Learn more on unit circle here: brainly.com/question/23989157

#SPJ1

7 0
2 years ago
Which of the following are true statements about any regular polygon? Check all that apply.
den301095 [7]
C,E and F hope this will help
4 0
3 years ago
Read 2 more answers
3 gallons of paint are used to paint 16 wooden sign how much paint did each sign use? between the two whole numbers does the ans
kkurt [141]
I think you should do it in a decimal idk if im right but in decimal form it is .1875
8 0
3 years ago
Leila says that 75% of a number will always be greater than 50% of any other number. Complete one inequality to support Leilas c
Greeley [361]
If a number is positive, Leila's theory that 75% of a number will always be greater than 50% of another number is <em>true</em>;<em> </em>however, if both numbers are negative, or if the number of which she finds 50% is much greater than the number of which she finds 75%, Leila's theory could be incorrect.

This inequality shows that Leila is correct: 100(0.75) \geq 50(0.50) (which simplifies to 75 \geq 25)

This inequality shows that Leila is incorrect: 50(0.75) \geq 100(0.50) (which simplifies to 37.5 \geq 50)

Hope this helps!
6 0
3 years ago
Read 2 more answers
Determine if the set is a Pythagorean triple
balandron [24]

Answer:

Pythagorean Triples are sets of whole numbers for which the Pythagorean Theorem holds true. The most well-known triple is 3, 4, 5. This means that 3 and 4 are the lengths of the legs and 5 is the hypotenuse.

4 0
3 years ago
Other questions:
  • The expression 7z-9p+9z-z
    9·1 answer
  • If m C=66, find the values of x and y.
    6·2 answers
  • Help please!!!!!!!!!!!
    8·1 answer
  • Graph the solution on a number line -6x+3&gt;-39
    10·1 answer
  • 513,428 rounded to the nearest thousand
    5·2 answers
  • Write the equation of the line that passes through (-4,3) and is parallel to y = -2x - 8.
    6·1 answer
  • PLEASE HELP!!!!
    14·2 answers
  • Help please I will give you the brainliest
    14·1 answer
  • Milk is sold 1/2 pint bottles in 1 pint bottles and 2 pint bottles
    10·1 answer
  • X-20=62 please Help thanks
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!