// switch.cpp : main project file.
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int type;
int main()
{
cout << "Type a number from 1 to 3:;
cin >> type;
switch ( type ){
case '1':
cout << "1";
break;
case '2':
cout << "2";
break;
case '3':
cout << "3";
break;
case '\n':
case '\t':
case ' ':
break;
default:
cout << "You typed an invalid number." << endl;
break;
}
cin.ignore();
cin.get();
return 0;
}