{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

chswitch - break case'B cout<<"The character...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// chswitch.cpp / #include <iostream.h> # int main() { char character_entered; cout << "Enter the character A or B: "; cin >> character_entered; switch(character_entered) { case 'A': cout << "The character entered was A, as in albatross.\n";
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: break; case 'B': cout << "The character entered was B, as in butterfly.\n"; break; default: cout << "Illegal entry\n"; break; } return 0; }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online