Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. char getTypeAcc() {
  2. char type;
  3. cout << "Enter account type: ";
  4. cin >> type;
  5. while(true) {
  6. switch(type) {
  7. case 'c' || 'C' || 'p' ||'P':
  8. return type;
  9. default:
  10. cout << "Error! Account Type must be C or P.";
  11. cout << "\nEnter the account type: ";
  12. cin >> type;
  13. }
  14. return type;
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement