diff options
| author | BensProgramma <[email protected]> | 2021-11-02 16:04:28 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-11-02 16:04:28 -0700 |
| commit | 1526b3a64b4542701b19b08f9feacf4c96b3a592 (patch) | |
| tree | 5f92b97a896d24dabc9fad5233154fbb270be357 | |
| parent | Delete Scores.h (diff) | |
| download | cst116-lab5-bensprogramma-1526b3a64b4542701b19b08f9feacf4c96b3a592.tar.xz cst116-lab5-bensprogramma-1526b3a64b4542701b19b08f9feacf4c96b3a592.zip | |
Delete ScoresFunctions.cpp
| -rw-r--r-- | CST116F2021-Lab5/ScoresFunctions.cpp | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/CST116F2021-Lab5/ScoresFunctions.cpp b/CST116F2021-Lab5/ScoresFunctions.cpp deleted file mode 100644 index 3b7db0a..0000000 --- a/CST116F2021-Lab5/ScoresFunctions.cpp +++ /dev/null @@ -1,80 +0,0 @@ - -#include "Scores.h" - - -void ReadScores(float testScore[]) -{ - cout << "Enter percent score of student: \n"; - - for (int i = 0; i < NUM_STUDENT; i++) // starting at 0, array numbered 0 to 9 - { - cout << " \t# " << i + 1 << " of " << NUM_STUDENT << " students:\t"; - cin >> testScore[i]; - } -} -void LetterG(char letterGrade[], float testScore[], int gradeCounts[]) -{ - - - for (int i = 0; i < NUM_STUDENT; i++) - { - if (testScore[i] >= 92.0) - { - letterGrade[i] = 'A'; - gradeCounts[0] = gradeCounts[0] + 1; - } - - else if (testScore[i] >= 84.0 && testScore[i] < 92.0) - { - letterGrade[i] = 'B'; - gradeCounts[1] = gradeCounts[1] + 1; - } - - else if (testScore[i] >= 75.0 && testScore[i] < 84.0) - { - letterGrade[i] = 'C'; - gradeCounts[2] = gradeCounts[2] + 1; - } - - else if (testScore[i] >= 65.0 && testScore[i] < 75.0) - { - letterGrade[i] = 'D'; - gradeCounts[3] = gradeCounts[3] + 1; - } - - else if (testScore[i] < 65.0) - { - letterGrade[i] = 'F'; - gradeCounts[4] = gradeCounts[4] + 1; - } - } -} - -void average(float testScore[]) -{ - float average = 0.0; - float total = 0.0; - for (int i = 0; i < NUM_STUDENT; i++) - { - total = total + testScore[i]; - } - - average = total / NUM_STUDENT; - cout << "\n\n\tClass Average: " << average << "%\n\n"; - return; -} -void displayG(float testScore[], char letterGrade[], int gradeCounts[]) -{ - for (int i = 0; i < NUM_STUDENT; i++) - { - cout << " Student # " << i + 1 << ",\tScore: " << testScore[i] << ", Letter Grade: " << letterGrade[i] << "\n"; - } - - cout << "\n\tThere were " << gradeCounts[0] << " A's\n"; - cout << "\tThere were " << gradeCounts[1] << " B's\n"; - cout << "\tThere were " << gradeCounts[2] << " C's\n"; - cout << "\tThere were " << gradeCounts[3] << " D's\n"; - cout << "\tThere were " << gradeCounts[4] << " F's\n"; - -} - |