Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char getTypeAcc() {
- char type;
- cout << "Enter account type: ";
- cin >> type;
- while(true) {
- switch(type) {
- case 'c' || 'C' || 'p' ||'P':
- return type;
- default:
- cout << "Error! Account Type must be C or P.";
- cout << "\nEnter the account type: ";
- cin >> type;
- }
- return type;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement