Question: c++ can you please include screenshots for every question sepratly how to create a txt file in mac thanks 1. Create the following input file:
how to create a txt file in mac 1. Create the following input file: - O student marks tid - Notepad File Edit Format View Help 66 47 88 75 Write a program that will read exactly 4 lines from this input file (.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 eofo 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). Add the following library to your program: include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
