How would I go about this? Totally clueless.

The Summer Olympics have past by during the summer of 2012. Your programming assignment is to develop a program to find out the winner of the gymnastics competition. The winner is the gymnast with the highest score. Each gymnast will receive a score from seven (7) judges. The highest and lowest score will be thrown out. The remaining five scores will be averaged to determine the gymnast final score. The output will list each gymnast with their final score followed by the overall winner.

The input will come from a file and the resulting output will be sent to the screen.





Your input will come from a file with the name - OLYMPICS.TXT and have the data listed as follows

OLGA KORBUT 8.8 7.8 3.4 8.9 10.0 6.5 9.9

MARY LOU RETTON 5.6 5.5 6.5 7.5 4.8 2.1 4.5

NADIA COMANECI 9.9 8.9 9.4 9.3 9.6 8.8 9.2

The number of Gymnasts in the file will vary.



The results will be written to the screen and have the format of

Gymnast Score

OLGA KORBUT 8.38

MARY LOU RETTON 5.38

NADIA COMANECI 9.28



The winner is NADIA COMANECI
open a txt file, put in the data, save it with the correct file name.
Write a program to read that file, post what you have then if you have any questions.
Topic archived. No new replies allowed.