Talent contest

Write a program that simulates a scoring system for a talent contest
with three judges. The program must read three integers between 1 and 10
representing the scores of the three judges. Based on these scores, the
program must determine the type of recognition the contestant will
receive and display a message on the screen:

- average greater than or equal to 9, write the phrase " Medalla or"

- average greater than or equal to 7 but less than 9, write the phrase "
  Medalla plata"

- average greater than or equal to 5 but less than 7, write the phrase "
  Medalla bronze"

- average less than 5, write the phrase " Cap premi"

Note that if two grades are the same and the third is different, the
program will add or subtract one point from the average depending on
whether the different grade is higher or lower than the others. If it is
higher, one point is subtracted and if it is lower, it is added. Once
the message has appeared on the screen, you must write down the score.
An additional prize will be awarded to the competitor if all three
scores are identical and he/she has won a medal. In this case, the
phrase "Premi a la unanimitat" will also be written.

Exam score: 0 Automatic part: 0%

Input

The input is three integers

Output

Write a first message with the corresponding award, the final score with
two decimals and, if applicable, a second message "Premi a la
unanimitat", as shown in the public tests.

Note: In order for the final evaluation to be displayed with two decimal
places, it is necessary to add the following lines of code just after
main:
cout.setf(ios::fixed);
cout.precision(2);

Problem information

Author: Professors PRO1

Generation: 2026-01-25T21:54:08.270Z

© Jutge.org, 2006–2026.
https://jutge.org
