Question: CSCI 221 Lab 3.1 File Number Stats Write a code that asks the user to enter a filename to open. When the user enters the

 CSCI 221 Lab 3.1 File Number Stats Write a code that

CSCI 221 Lab 3.1 File Number Stats Write a code that asks the user to enter a filename to open. When the user enters the filename the program should attempt to open the file and then show the numbers in the file followed by the count of how many numbers there were, the average, highest and lowest of the numbers. Use a sentinel controlled loop. Make it match the format below: which file would you like to open? data1.txt Here are the numbers in the file: 1: 10 2: 20 3: 33 4: 45 5: 15 6: 99 7: 75 8: 333 9: 4 10: 18 11: 91 12: 222 13: 333 There were 13 numbers in the file. The average was: 99.85 The highest was: 333 The lowest was: 4 If the file is not found the program should display the following error and quit which file would you like to open? Silly Error opening file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!