This is switch simulation program in C++