should use
break for each case statement.
consider the switch statement format.
switch (expression)
{
case valueOne: statement;
break;
case valueTwo: statement;
break;
....
case valueN: statement;
break;
default: statement;
}
NOTE: It is almost always a good idea to have a default case in switch statements. If you have no other need for the default, use it to test for the supposedly impossible case, and print out an error message; this can be a tremendous aid in debugging.
so modify your switch statement like this
switch (dept)
{
cout<<dept;
case S: cout<< "Sales\n"; break;
case A: cout<< "Accounting\n"; break;
case E: cout<< "Engineering\n"; break;
case H: cout<< "Human Resouces\n"; break;
case F: cout<< "Finance!\n";
break;
default: cout<<"Enter a valied character"<<endl;
}