Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <string>
  4. #include "TestGrader.h"
  5.  
  6. using std::string;
  7. using std::cin;
  8. using std::cout;
  9. using std::endl;
  10.  
  11. int main()
  12. {
  13.     string answers[20] = {"B", "D", "A", "A",
  14.                           "C", "A", "B", "A",
  15.                           "C", "D", "B", "C",
  16.                           "D", "A", "D", "C",
  17.                           "C", "B", "D", "A"};
  18.  
  19.     TestGrader exam;
  20.  
  21.     exam.setKey(answers);
  22.  
  23.     string examinee[20];
  24.     int selection;
  25.     do
  26.         {
  27.         for (int x = 0; x < 20; x++)
  28.         {
  29.             cout << "Question #" << x + 1 <<": " << endl;
  30.             cin >> examinee[x];
  31.  
  32.         }
  33.  
  34.         exam.grade(examinee);
  35.  
  36.     } while (selection != -1);
  37.  
  38.  
  39.     return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement