#include using namespace std; //Lab 6 for CmpE46// int main () { int m , o1 , o2 , s;// integers for the inputs cout << "There are four people who could be using two lockers." << endl; cout << "Enter 1 if they are not using the locker." << endl; cout << "Enter 0 is the locker is available." << endl; cout << "Beginning the questions. Please enter 1 or 0 ONLY." << endl; cout << "Does the Manager have a locker available?" << endl; cin >> m;//input for manager cout << "Does the Officier A have a locker available?" << endl; cin >> o1;// input for officier A cout << "Does the Officier B have a locker available?" << endl; cin >> o2;// input for officer B cout << "Does the Security guy have a locker available?" << endl; cin >> s;// input for security if ( (m==0 && o1==0 && o2==0 && s==0) ||//Choices for both lockers closed. ( m==0 && o1==0 && o2==0 && s==1) || ( m==0 && o1==1 && o2==0 && s==0) || ( m==0 && o1==1 && o2==0 && s==1) || ( m==1 && o1==0 && o2==0 && s==0)) cout << "Lockers 1 and 2 are CLOSED!" << endl; else if ( (m==0 && o1==0 && o2==1 && s==1) || ( m==1 && o1==0 && o2==1 && s==1) || ( m==1 && o1==1 && o2==0 && s==0) ||//All possible combination of locker 2 is open. ( m==1 && o1==1 && o2==0 && s==1)) cout << "Locker 2 is OPEN!" << endl; else if ( (m==0 && o1==1 && o2==1 && s==0) || ( m==0 && o1==1 && o2==1 && s==1) || ( m==1 && o1==0 && o2==0 && s==1) || ( m==1 && o1==0 && o2==1 && s==0) ||//All possible combination of locker 1 is open. ( m==1 && o1==1 && o2==1 && s==0)) cout << "Locker 1 is OPEN!" << endl; else if ( m==1 && o1==1 && o2==1 && s==1)//Combo for just locker 1 and 2 open. cout << "Lockers 1 and 2 are OPEN!" << endl; else cout << "You have entered a wrong number somewhere along the program." << endl; return 0; }