I assume that you're talking about switch statements.
Code:
#include <iostream>
using std::cout;
using std::cin;
int main()
{
int x;
cout << "Enter a number from 1 - 5 : ";
cin >> x;
switch( x )
{
case 1: cout << "\nYou are dumb!"; break;
case 2: cout << "\nYou are average!"; break;
case 3: cout << "\nYou are clever!"; break;
case 4: cout << "\nYou are very clever!"; break;
case 5: cout << "\nYou are a genius!"; break;
default: cout << "\nYou are really dumb!"; break;
}
return 0;
}
The keyword break must be included if you want to "break" out of the switch statement. If a number is entered that is not in the range 1-5, then the default statement is executed.