Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Is east on left or right?
- A) left
- B) right
- C) none of the above
- What symbol is used for cout?
- A) <<
- B) >>
- C) >
- D) <
- What is used for cin?
- A) >>
- B) <
- C) >
- D) <<
- #include <iostream>
- #include <string>
- #include <fstream>
- #include <vector>
- #include <algorithm>
- using namespace std;
- int main()
- {
- char c;
- char d;
- string line_;
- ifstream file_("mpchoice.txt");
- vector<string> lines;
- if (file_.is_open())
- {
- while (getline(file_, line_))
- {
- cout << line_ << 'n';
- lines.push_back(line_);
- }
- file_.close();
- }
- cout << "What is your response for number 1n";
- cin >> c;
- if (c == 'A')
- cout << "That's wrongn";
- cout << "What's your response for the second questionn";
- cin >> d;
- if (d == 'A'){
- cout << "That's correctn";
- }
- else
- cout << "That's wrongn";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement