avr39ripe

cppDoorADoorBQuest

Jun 14th, 2021
630
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5.     bool doorA{ false };
  6.     bool doorB{ false };
  7.  
  8.     //std::cout << "--doorA --\n";
  9.     //std::cout << "--doorB --\n";
  10.  
  11.     //std::cout << "Enter door A state [1 - open/0 - closed]\n";
  12.     //std::cin >> doorA;
  13.     //std::cout << "Enter door B state [1 - open/0 - closed]\n";
  14.     //std::cin >> doorB;
  15.  
  16.     //if (doorA and doorB)
  17.     //{
  18.     //  std::cout << "Hurra! We'vr reach destanation point! :)\n";
  19.     //}
  20.     //else
  21.     //{
  22.     //  std::cout << "Doors are closed!\n";
  23.     //}
  24.  
  25.     std::cout << "--doorA ----doorB --\n";
  26.  
  27.     std::cout << "Enter door A state [1 - open/0 - closed]\n";
  28.     std::cin >> doorA;
  29.     std::cout << "Enter door B state [1 - open/0 - closed]\n";
  30.     std::cin >> doorB;
  31.  
  32.     if (doorA or doorB)
  33.     {
  34.         std::cout << "Hurra! We'vr reach destanation point! :)\n";
  35.     }
  36.     else
  37.     {
  38.         std::cout << "Doors are closed!\n";
  39.     }
  40.  
  41. }
RAW Paste Data