Untitled
By: a guest | Mar 22nd, 2010 | Syntax:
C++ | Size: 0.45 KB | Hits: 66 | Expires: Never
#include <iostream>
using namespace std;
int main ()
{
int num1;
cout << "Enter a number: ";
cin >> num1;
switch (num1)
{
case 1:
cout << "The value is 1" << endl;
break;
case 2:
cout << "The value is 2" << endl;
break;
case 3:
cout << "The value is 3" << endl;
break;
case (4<num1<9):
cout << "The value is between 4 and 9" << endl;
break;
}
system("pause");
return 0;
}