CIS22A - Fall 2019 - Lab Exercise 8

due Wednesday, 11/13 8:30 am

Lab exercises are not accepted late.

Put your name, Lab Exercise 8, and compiler and the operating system used in a comment at the top of your program. Email only your source code. Your source code should be sent as an attachment (with the name ex8.cpp).  Use "Ex8" as the subject of your email submission

Program Requirements

Write a function that takes a char argument and returns a random int

The function should return 0, if the argument in not 'B', 'I', 'N', 'G', or 'O'.  Use a switch in your function and use this main() to test your function:

int main()
{
   cout << yourfunction('B') << endl;
   cout << yourfunction('I') << endl;
   cout << yourfunction('N') << endl;
   cout << yourfunction('G') << endl;
   cout << yourfunction('O') << endl;
   cout << yourfunction('Z') << endl;
}