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
Tom goes to a restaurant and the food bill is $22. If he wants to give the waiter a 20% tip. What will the total cost of the mea
jek_recluse [69]

Answer: $4.40

Step-by-step explanation:

Trust me did the assignment

3 0
2 years ago
Read 2 more answers
Which is the only center point that lies on the edge of a triangle?
Rus_ich [418]

The circumcenter is also center of the triangles circumcircle. i'm not 100% but if this is one of your answers then i hoped this helped!

4 0
3 years ago
Read 2 more answers
I am<br> thinking of a #at least 13
steposvetlana [31]

Answer:

what do u mean

skjfjdkd

3 0
3 years ago
Jogging burns 375 calories in 45 minutes. Determine how many calories burned per hour?
Sveta_85 [38]
Answer: 500 calories

Set them as proportions
375/46=x/60
Multiply 60 to each side to eliminate fraction
Then you’ll get x=500
3 0
3 years ago
A company that sells home and kitchen products online is tracking the number of visitors on their website overnight to determine
olchik [2.2K]

Answer:

Step-by-step explanation:

its A

5 0
3 years ago
Read 2 more answers
Other questions:
  • What is the equation in point slope form of the line passing through (4,0) and (2,6)
    13·1 answer
  • franklin sold water bottles in two sizes, large ($2.50 each ) and regular ($1 each). He sold 113 bottles altogether and collecte
    9·1 answer
  • A grain of sand weighs about 1 x 10 g.
    7·1 answer
  • aleena has a watering can. she uses 3/8 gallonto water her roses and1/3 gallon to water the geraniums . How much water did. Alee
    7·1 answer
  • 100 more than 225 is​
    14·2 answers
  • HELP!! Help!! HELP!!
    14·1 answer
  • What's the sum of two integers with different signs is 8
    5·1 answer
  • Solve using addition or subtraction 3.9 + t =4.5​
    10·1 answer
  • Which statement is true? A)4[3(5+2)]=95-4×3 B)4[3(5+2)] not equal 95-4×3
    10·2 answers
  • Colleen's movie collection contains 6 movies, including 2 action movies. What is the probability that a randomly selected movie
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!