Common Application of Switch Statement C++: Example