Question: You will write a program that performs the following tasks: Open a user-specified file for input. Prompt for the name of the file, read it


You will write a program that performs the following tasks: Open a user-specified file for input. Prompt for the name of the file, read it into a string variable, echo print it to the terminal and then open it. The loop continues until the user successfully enters a valid file name or presses ctrl-c to exit. The first line in the input file contains an integer value indicating the number of test scores for each student. The rest of the input file contains the test scores for an unknown number of students (one student per line). For each student in the file, the program reads a student's last name, first name, and their test scores. For each student, print a summary of the student's information: The last name, the first name, the average of the student's test scores, and the corresponding letter grade for the test score average Use a while loop to read and process all the information in the input file (this will be an outer loop). Use a while loop to read and process the test scores for a student (this will be a loop inside the outer loop). Assume that all input files have valid data only. Each student in a file has the same number of test scores and all students have at least one test score. The number of test scores each student has will vary from input file to input file. You will write a program that performs the following tasks: Open a user-specified file for input. Prompt for the name of the file, read it into a string variable, echo print it to the terminal and then open it. The loop continues until the user successfully enters a valid file name or presses ctrl-c to exit. The first line in the input file contains an integer value indicating the number of test scores for each student. The rest of the input file contains the test scores for an unknown number of students (one student per line). For each student in the file, the program reads a student's last name, first name, and their test scores. For each student, print a summary of the student's information: The last name, the first name, the average of the student's test scores, and the corresponding letter grade for the test score average Use a while loop to read and process all the information in the input file (this will be an outer loop). Use a while loop to read and process the test scores for a student (this will be a loop inside the outer loop). Assume that all input files have valid data only. Each student in a file has the same number of test scores and all students have at least one test score. The number of test scores each student has will vary from input file to input file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
