Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. bool main()
  2. {
  3.      cout<<"do you want to proceed(y or n)\n?";
  4.      
  5.      char answer = 0;
  6.      cin >> answer;
  7.      
  8.      switch (answer){
  9.      case 'y':
  10.           return true;
  11.      case 'n':
  12.           return false;
  13.      default:
  14.      cout << "I'll take that for a no.\n";
  15.      return false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement