Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1) Create a program that will read in four grades entered by the user and store

ID: 3632431 • Letter: 1

Question

1) Create a program that will read in four grades entered by the user and store them in an array. The program will calculate the average of the four grades and print the average to the screen as well as the four grades that the user entered. Test your program.

Include the documentation at the top of the source file (name of source code file, your name, date and a brief description of what the program does). Also use meaningful variable names, proper levels of indentation and inline comments.

Input: four grades
Output: The four grades and the average of the four grades.

2) Use what you wrote for number 1 and expand on it. Now you will allow the user to input as many sets of student grades as he/she wants. The user can end at any time. Each student will have four grades and one average grade. The user can decide to stop at any time before entering a new set of four grades for a student. (use either a flag or a sentinel value) Use the same documentation guidelines as in number 1.

3) Now expand on number 2 by, in addition to printing the average for each student, also calculate and print the entire class average. The same documentation standards apply.

Explanation / Answer

#include #include using namespace std; int main() { int grade[4]; int count; int total = 0; double average; for (count = 0; count