This is stuck in an infinite loop
#include <iostream> using namespace std; int main() { int k = 0; enum CompanyRole {EXECUTIVE = 1, MANAGER = 2, STAFF = 3}; cin >> k; while((k != 1) || (k!=2) || (k!=3)){ switch(k) { case EXECUTIVE: cout << "Executive\n"; break; case MANAGER: cout << "Manager\n"; break; case STAFF: cout << "Staff\n"; break; default: cout << "Wrong role. Enter again.\n"; break; } std::cin >> k; } return 0;