Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
use vectors in c++ programming to read the file and compute the calculations 5.40 Lab 6- Using Vectors with Scores at reads in a text
use vectors in c++ programming to read the file and compute the calculations 5.40 Lab 6- Using Vectors with Scores at reads in a text file of scores, stores those scores in a vector, and then uses that vector of data to calculate and You will write a code th then output some statistics. Suppose the file'scores txt contains the following integer values 92 100 60 42 67 When your program runs, the first step is to input a flename from the keyboard Lets assume the user enters scores txt The program opens this file, reads in the values and stores in a vector, counts, computes the average, and outputs the following Therefore, your code needs to determine the number of total scores (which will be the number of students). It needs to count the number of zero scores. It needs to compute the average score, where the O's are not included in the average. Finally, it needs to count the number of scores above average In general, assume the input file contains 1 or more valid integers in the range 0.100, inclusive. Please also include the error message, "Error, unable to open file" if the filename provided by the user does not exist
use vectors in c++ programming to read the file and compute the calculations
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started