// Print the type of gas switch( gasType ) { case 'r': cout << "regular" << endl; break; case 'p': cout << "premium" << endl; break; case 's': cout << "super" << endl; break; default: cout << "invalid" << endl; }