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
2. What is gross income? What types of income are included in gross income?
gogolik [260]
Gross income is all a persons receipts and gains from all sources before any deductions.
8 0
3 years ago
Name 2 same side interior angles
Leokris [45]

Answer:

Transversal and Consecutive

7 0
3 years ago
[1x-6]&gt;1 what are the solutions
a_sh-v [17]

Answer:

x > 7

(I think this is Right but not sure yet )

3 0
3 years ago
What is 16-2t = t + 9 + 4t
Semmy [17]

Answer:

t=1

Step-by-step explanation:

16-2t = t + 9 + 4t

Combine like terms

16-2t =  9 + 5t

Add 2t to each side

16 -2t+2t = 9+5t+2t

16 = 9+7t

Subtract 9 from each side

16-9 = 9-9 +7t

7=7t

Divide each side by 7

7/7 = 7t/7

1 =t

6 0
3 years ago
Read 2 more answers
Which answer is the solution set of -4 ≤ 3 - y over the whole numbers?
mr_godi [17]
The answer will be d pretty sure
4 0
3 years ago
Other questions:
  • X^2+6X=16 is a quadratic equation what are the solutions?
    15·2 answers
  • The US Census Bureau reported the US population to be approximately 308,000,000 in 2010. It also reported that 6.5% of the popul
    11·1 answer
  • ALGEBRA SECTION 3 TEST YOURSELF <br>PLEASE I NEED HELP ASAP RIGHT NOW PLEASE
    5·1 answer
  • Jerry has a miniature model of a boat. He knows that the boat is 3 3/4 inches wide and 5 1/2 inches long. What is the actual len
    6·1 answer
  • A new housing development offers homes with a mortgage of $222,000 for 25 years at an annual interest of 8%. Find the monthly mo
    12·1 answer
  • Which function could be shown in the graph below?
    13·2 answers
  • What’s 2 x 21 whats the answer
    8·2 answers
  • 2. Which expression is equivalent to 20+64
    7·1 answer
  • The sound of a jet engine of a skyhawk jetfighter is 70000 times louder than the sound of a lawnmower if the lawnmower has the l
    9·1 answer
  • The graph of y = f(x) is shown below. What are all of the real solutions of f(x) = 0?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!