Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. Is east on left or right?
  2. A) left
  3. B) right
  4. C) none of the above
  5.  
  6. What symbol is used for cout?
  7. A) <<
  8. B) >>
  9. C) >
  10. D) <
  11.  
  12. What is used for cin?
  13. A) >>
  14. B) <
  15. C) >
  16. D) <<
  17.  
  18. #include <iostream>
  19. #include <string>
  20. #include <fstream>
  21. #include <vector>
  22. #include <algorithm>
  23. using namespace std;
  24. int main()
  25. {
  26.  
  27. char c;
  28. char d;
  29. string line_;
  30. ifstream file_("mpchoice.txt");
  31. vector<string> lines;
  32.  
  33. if (file_.is_open())
  34. {
  35. while (getline(file_, line_))
  36. {
  37. cout << line_ << 'n';
  38. lines.push_back(line_);
  39. }
  40. file_.close();
  41. }
  42.  
  43. cout << "What is your response for number 1n";
  44. cin >> c;
  45.  
  46. if (c == 'A')
  47. cout << "That's wrongn";
  48. cout << "What's your response for the second questionn";
  49. cin >> d;
  50.  
  51. if (d == 'A'){
  52. cout << "That's correctn";
  53. }
  54. else
  55. cout << "That's wrongn";
  56.  
  57.  
  58. return 0;
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement