Write a program that takes input from a file of numbers of type double and outputs the average of those numbers to the screen. You may use the file avg.dat to test your program. The output to the screen when using this file should be:
Average = 15.2325
Your program should not continue if an error occurs while opening the file.
Write a program that takes a name and their numeric grade from an input file and converts them to letter grades that are then output to an output file. The numeric grades are integers from 0 to 100. The scale for converting to letter grades is:
> 89 = A 80 - 89 = B 70 - 79 = C 60 - 69 = D < 60 = FYou may use the file in_grades.dat as your input file to test your program. The output file given this input file should look something like this:
You can use a string variable to store the name. An example string variable declaration is:
     char name[16];
This variable name can now store strings up to 15 (16-1) characters long.
Pages 241-244 in the textbook goes into more detail about inputting and storing string variables.
Modify your program from Part 2 so that it outputs both the numeric grade and the letter grade next to their name. Format the output so that it looks like this:
Matt 34 F John 90 A Mary 95 A Joan 99 A Jeremy 67 D Paul 59 F Lisa 58 F Lorena 60 D Brandon 70 C John 80 B Jim 90 A Kim 100 A Nellie 101 A
You may want to review section 5.2 in the textbook before tackling this part.
Modify your program so that it takes input from the user instead of a file. The program should get a name and that person's numeric score. It then should output the name, the numeric score and the corresponding letter grade to an output file. The name of the output file should come from the user. You should format your output as in part 3. The program should continue to get input from the user until the user states they are done (they no longer want to continue).