Question: Create the following C++ program: 1. Open the file called grades.csv 2. Print an error message if the file cannot be opened. . If the

 Create the following C++ program: 1. Open the file called grades.csv

Create the following C++ program: 1. Open the file called grades.csv 2. Print an error message if the file cannot be opened. . If the file has been opened successfully Skip the first line as it contains the header. Compute the average and count the number of rows in the file a. 55.98 b. Hint: in order to extract the grade from each line, assume that the grade starts at position Use the seekg method. 714 BBUSS4WX 100 W3WOFOOK 100 Write the sum,count, and average to a file called Results.txt such that: a. The label column is right justified in a column of length 10. Use the character'@' as th F2OSTOKO 48.5 X983TSLS 8891 character. b. Use precision 2 except for the count, its precision is 0. Your output file, Results.txt, should look as follows. F2LSGBOG 6706 86.19 T101U9PB 100 T2WeW1FA 41.85 QOL9X7QM 95.81 B7L5ATBW 99.8 GSHW9TC 9999 eeeeeSum: 1618.89 ea@Count: 20 e@Avg: 80.94 I7D1X6DA 59.71 CL

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!