Question: c++ No need for question one and two, and can you include screenshots please, thanks 1. Create the following input file: - student_marks.txt - Notepad

c++

No need for question one and two, and can you include screenshots please, thanksc++ No need for question one and two, and can you include

1. Create the following input file: - student_marks.txt - Notepad File Edit Format View Help 66 47 88 75 Write a program that will read exactly 4 lines from this input file (i.e. use a counter to determine when to break out of your loop). 2. Re-write the above program but have it break out of an indefinite while-loop using a break statement. 3. Re-write the above program so that you read until the end of the file (i.e. using the built-in eof() function) 4. Modify the above program so that you print the average of the 4 marks to the console. (Hint: keep a running total of the marks (an accumulator) and when the loop is finished divide by the number of lines. You will also need to convert each number that is read from the file to an integer by using the built-in stoi() function)

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!