Tuesday, January 15, 2019

URI 1117:: SOLUTION

URI Online Judge | 1117

Score Validation

Write a program that reads two scores of a student. Calculate and print the average of these scores. Your program must accept just valid scores [0..10]. Each score must be validated separately.

Input

The input file contains many floating-point numbers​​, positive or negative. The program execution will be finished after the input of two valid scores.

Output

When an invalid score is read, you should print the message "nota invalida".
After the input of two valid scores, the message "media = " must be printed followed by the average of the student. The average must be printed with 2 numbers after the decimal point.
Input SampleOutput Sample
-3.5
3.5
11.0
10.0
nota invalida
nota invalida
media = 6.75



[WAIT]
     First of all, think yourself that you have tried enough for the problem. If you did not please read the program once. REMEMBER one thing, just believe in yourself.....YOU CAN.....YOU KNOW....



See the ANSWER here...

No comments:

Post a Comment