daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <string>
  4. #include <vector>
  5. #include <algorithm>
  6. #include <cmath>
  7. #include <Windows.h>
  8.  
  9. using namespace std;
  10. inline void keep_window_open() { char ch; cin >> ch; }
  11.  
  12. int main()
  13. {
  14.     char answer;
  15.     int final_score = 0;
  16.  
  17.     cout << "1. What is 2 * 9? Please pick the correct letter answer (in lowercase) below.\n";
  18.     cout << "\n";
  19.     cout << "   a) 14\n";
  20.     cout << "   b) 16\n";
  21.     cout << "   c) 18\n";
  22.     cout << "   d) 19\n";
  23.     cout << "   e) 23\n";
  24.     cout << "\n";
  25.     cin >> answer;
  26.     cout << "\n";
  27.     switch (answer) {
  28.     case 'a':
  29.         Sleep(1200);
  30.         cout << "Incorrect!\n";
  31.         cout << "\n";
  32.         cout << "\n";
  33.         cout << "\n";
  34.         break;
  35.     case 'b':
  36.         Sleep(1200);
  37.         cout << "Incorrect!\n";
  38.         cout << "\n";
  39.         cout << "\n";
  40.         cout << "\n";
  41.         break;
  42.     case 'c':
  43.         Sleep(1200);
  44.         cout << "Correct!\n";
  45.         cout << "\n";
  46.         cout << "\n";
  47.         cout << "\n";
  48.         final_score++;
  49.         break;
  50.     case 'd':
  51.         Sleep(1200);
  52.         cout << "Incorrect!\n";
  53.         cout << "\n";
  54.         cout << "\n";
  55.         cout << "\n";
  56.         break;
  57.     case 'e':
  58.         Sleep(1200);
  59.         cout << "Incorrect!\n";
  60.         cout << "\n";
  61.         cout << "\n";
  62.         cout << "\n";
  63.         break;
  64.     default:
  65.         Sleep(1200);
  66.         cout << "Sorry, I did not understand your answer. Please make sure you choose a letter (in lowercase).\n";
  67.         cout << "\n";
  68.         cout << "\n";
  69.         cout << "\n";
  70.         break;
  71.     }
  72.     Sleep(1500);
  73.     cout << "2. What is 4 * 4? Please pick the correct letter answer (in lowercase) below.\n";
  74.     cout << "\n";
  75.     cout << "   a) 14\n";
  76.     cout << "   b) 16\n";
  77.     cout << "   c) 18\n";
  78.     cout << "   d) 19\n";
  79.     cout << "   e) 23\n";
  80.     cout << "\n";
  81.     cin >> answer;
  82.     cout << "\n";
  83.     switch (answer) {
  84.     case 'a':
  85.         Sleep(1200);
  86.         cout << "Incorrect!\n";
  87.         cout << "\n";
  88.         cout << "\n";
  89.         cout << "\n";
  90.         break;
  91.     case 'b':
  92.         Sleep(1200);
  93.         cout << "Correct!\n";
  94.         cout << "\n";
  95.         cout << "\n";
  96.         cout << "\n";
  97.         final_score++;
  98.         break;
  99.     case 'c':
  100.         Sleep(1200);
  101.         cout << "Incorrect!\n";
  102.         cout << "\n";
  103.         cout << "\n";
  104.         cout << "\n";
  105.         break;
  106.     case 'd':
  107.         Sleep(1200);
  108.         cout << "Incorrect!\n";
  109.         cout << "\n";
  110.         cout << "\n";
  111.         cout << "\n";
  112.         break;
  113.     case 'e':
  114.         Sleep(1200);
  115.         cout << "Incorrect!\n";
  116.         cout << "\n";
  117.         cout << "\n";
  118.         cout << "\n";
  119.         break;
  120.     default:
  121.         Sleep(1200);
  122.         cout << "Sorry, I did not understand your answer. Please make sure you choose a letter (in lowercase).\n";
  123.         cout << "\n";
  124.         cout << "\n";
  125.         cout << "\n";
  126.         break;
  127.     }
  128.     Sleep(1500);
  129.     cout << "3. What is 20 / 2? Please pick the correct letter answer (in lowercase) below.\n";
  130.     cout << "\n";
  131.     cout << "   a) 4\n";
  132.     cout << "   b) 6\n";
  133.     cout << "   c) 9\n";
  134.     cout << "   d) 10\n";
  135.     cout << "   e) 13\n";
  136.     cout << "\n";
  137.     cin >> answer;
  138.     cout << "\n";
  139.     switch (answer) {
  140.     case 'a':
  141.         Sleep(1200);
  142.         cout << "Incorrect!\n";
  143.         cout << "\n";
  144.         cout << "\n";
  145.         cout << "\n";
  146.         break;
  147.     case 'b':
  148.         Sleep(1200);
  149.         cout << "Incorrect!\n";
  150.         cout << "\n";
  151.         cout << "\n";
  152.         cout << "\n";
  153.         break;
  154.     case 'c':
  155.         Sleep(1200);
  156.         cout << "Incorrect!\n";
  157.         cout << "\n";
  158.         cout << "\n";
  159.         cout << "\n";
  160.         break;
  161.     case 'd':
  162.         Sleep(1200);
  163.         cout << "Correct!\n";
  164.         cout << "\n";
  165.         cout << "\n";
  166.         cout << "\n";
  167.         final_score++;
  168.         break;
  169.     case 'e':
  170.         Sleep(1200);
  171.         cout << "Incorrect!\n";
  172.         cout << "\n";
  173.         cout << "\n";
  174.         cout << "\n";
  175.         break;
  176.     default:
  177.         Sleep(1200);
  178.         cout << "Sorry, I did not understand your answer. Please make sure you choose a letter (in lowercase).\n";
  179.         cout << "\n";
  180.         cout << "\n";
  181.         cout << "\n";
  182.         break;
  183.     }
  184.     cout << "\n";
  185.     cout << "Thank you for taking the test! Your final score is " << final_score << " correct answers out of 3.\n";
  186. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top