//Tyler Taormina //Lab 5 CST 116 //October 2021 LAB 5 ________________________________________________________________________________________________________________________ 9a 10.5 Learn by Doing Exercises p 247 10 pts #1 Submit: code & run CODE: #include using namespace std; const int NUM_SCORES = 10; const int NUM_STUDENTS = 10; int main() { float currStudent[NUM_SCORES]{0.0}; char LetterGrades[NUM_SCORES]; float total = 0.0, average = 0.0; int A = 0, B = 0, C = 0, D = 0, F = 0; //Read scores for (int i = 0; i < NUM_SCORES; i++) { cout << "Enter Score #" << i + 1 << " of " << NUM_SCORES << ": " << endl; cin >> currStudent[i]; } //Letter Grade List for (int i = 0; i < NUM_STUDENTS; i++) { //Letter Grade A if (currStudent[i] >= 92.0) { LetterGrades[i] = char(65); A += 1; } //Letter Grade B else if (currStudent[i] < 92.0 && currStudent[i] >= 84.0) { LetterGrades[i] = char(66); B += 1; } //Letter Grade C else if (currStudent[i] < 84.0 && currStudent[i] >= 75.0) { LetterGrades[i] = char(67); C += 1; } //Letter Grade D else if (currStudent[i] < 75.0 && currStudent[i] >= 65.0) { LetterGrades[i] = char(68); D += 1; } //Letter Grade F else { LetterGrades[i] = char(70); //F F += 1; } } //Calculate average score for class for (int i = 0; i < NUM_SCORES; i++) { total += currStudent[i]; } average = total / NUM_STUDENTS; //Print Info for (int i = 0; i < NUM_SCORES; i++) { cout << "Student " << i + 1 << " Letter Grade: " << LetterGrades[i]; cout << " and Score: " << currStudent[i] << endl; } cout << endl; cout << endl; cout << "Class Average: " << average << endl; cout << "A's: " << A << endl; cout << "B's: " << B << endl; cout << "C's: " << C << endl; cout << "D's: " << D << endl; cout << "F's: " << F << endl; return 0; } RUN: C:\Users\Till\CLionProjects\gitDemo\cmake-build-debug\gitDemo.exe Enter Score #1 of 10: 100 Enter Score #2 of 10: 90 Enter Score #3 of 10: 74 Enter Score #4 of 10: 74 Enter Score #5 of 10: 89 Enter Score #6 of 10: 44 Enter Score #7 of 10: 44 Enter Score #8 of 10: 89 Enter Score #9 of 10: 59 Enter Score #10 of 10: 5 Student 1 Letter Grade: A and Score: 100. Student 2 Letter Grade: B and Score: 90. Student 3 Letter Grade: D and Score: 74. Student 4 Letter Grade: D and Score: 74. Student 5 Letter Grade: B and Score: 89. Student 6 Letter Grade: F and Score: 44. Student 7 Letter Grade: F and Score: 44. Student 8 Letter Grade: B and Score: 89. Student 9 Letter Grade: F and Score: 59. Student 10 Letter Grade: F and Score: 5. Class Average: 66.8 A's: 1 B's: 3 C's: 0 D's: 2 F's: 4 Process finished with exit code 0 ________________________________________________________________________________________________________________________ 9b 10.6 Learn by Doing Exercises p 253 Break into 3 files: the main() file, the functions .cpp file and the .h file. 10 pts #1 Submit: code & runs CODE: View code in Folder mod_9b. Contains the three files. RUN: t Enter Score #1 of 10: 99 Enter Score #2 of 10: 99 Enter Score #3 of 10: 99 Enter Score #4 of 10: 99 Enter Score #5 of 10: 99 Enter Score #6 of 10: 99 Enter Score #7 of 10: 44 Enter Score #8 of 10: 55 Enter Score #9 of 10: 44 Enter Score #10 of 10: 44 Student 1 Letter Grade: A and Score: 99 Student 2 Letter Grade: A and Score: 99 Student 3 Letter Grade: A and Score: 99 Student 4 Letter Grade: A and Score: 99 Student 5 Letter Grade: A and Score: 99 Student 6 Letter Grade: A and Score: 99 Student 7 Letter Grade: F and Score: 44 Student 8 Letter Grade: F and Score: 55 Student 9 Letter Grade: F and Score: 44 Student 10 Letter Grade: F and Score: 44 Class Average: 78.1 A's: 6 B's: 0 C's: 0 D's: 0 F's: 4 ________________________________________________________________________________________________________________________ 10a 10.7 Learn by Doing Exercises p 260 Break into at least 3 files as in 9b. 10 pts #2 Submit: code & runs CODE: see folder mod_10a RUN: ________________________________________________________________________________________________________________________ 10b 10.8 Learn by Doing Exercises p 273 Break into at least 3 files as in 9b. 10 pts #7 Write a full program to do this. Submit: code & runs CODE: see folder mod_10b RUN: