C++ Program for a simple state machine