HW help please!!

i'm asked to : " Write a program for entering test scores and calculating results of the scores. The
scores should be saved in a file. Here is how the program should look when it is run.

The program should use file streams – ifstream and ofstream – for its file IO.

(Sample run. User input is shown in bold)


Welcome to the test scores program!
What do you wish to do? 1 = create file 2 = read file 3 = quit
1
Enter filename:
scores.txt
Enter a series of scores, with -1 to stop
10.5 9.5 10 12 -1
What do you wish to do? 1 = create file 2 = read file 3 = quit
2
Enter filename:
scores2.txt
Error - could not open scores2.txt
What do you wish to do? 1 = create file 2 = read file 3 = quit
2
Enter filename:
scores.txt
Total of scores = 42
Average is 10.5
What do you wish to do? 1 = create file 2 = read file 3 = quit
3
ok, goodbye!
Last edited on
Topic archived. No new replies allowed.