Write a program that prompts to read students\' names followed by their test sco
ID: 3770247 • Letter: W
Question
Write a program that prompts to read students' names followed by their test scores (1 test score for every student). The program should output to the screen, the student's name followed by the test score, and the relevant grade. At the end, it should also find and print the highest test score and the name of the student with the highest test score, the lowest test score and the name of the student with the lowest test score, and the average of the test scores. Design: Student data should be stored in a struct variable of type studentType, which has four members or components: studentFName and studentLName of type string, testScore of type int (range 0 to 100), and grade of type char. Create an array of size 5, so your program can store up to 5 students. Guard against array index out of bounds; so if the user tries to add more than 5 students, tell them that they can’t add any more. Use an array of structs. You may read input data from the user or from a file. Use at least 2 or more functions, such as findAverage, findHighest, findLowest, etc. To get credit, you must pass your struct array to the functions as parameters. Output: Your program must output each student's data in this form: last name, first name, score, and grade, all left justified, so use iomanip. Then finally, output the student's name with the highest score and the corresponding score, the student’s name with the lowest score and their score, and the average of all the scores.
Explanation / Answer
Write a program that prompts to read students' names followed by their test sco
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.