Advertisement
heroys6

Untitled

Aug 28th, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     char start_ans[80];
  8.     do
  9.     {
  10.         cout << "\n\nWhat do you want to do?\n\n"
  11.             << " [1] one\n [2] two\n [3] three\n\n"
  12.             << "Your answer will be: ";
  13.         cin >> start_ans;
  14.     } while (atoi(start_ans) != 1 && atoi(start_ans) != 2 && atoi(start_ans) != 3);
  15.  
  16.     system("pause");
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement