chswitch - break; case 'B': cout << "The...

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

This note was uploaded on 06/20/2011 for the course COMPUTER 12 taught by Professor Aymanboghdady during the Spring '11 term at American College of Computer & Information Sciences.

Ask a homework question - tutors are online