Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 3:
- while((tmp!=accountNum1)||(tmp!=accountNum2)){
- printf("Enter an account to withdraw (%d or %d?): ", accountNum1,accountNum2);
- scanf("%d", &tmp);
- if((tmp!=accountNum1)||(tmp!=accountNum2))
- printf("invalid account number.\n");
- }
- printf("Enter an amount to withdraw: ");
- scanf("%d", &tmp);
- //input validation
- if (tmp== accountNum1){
- withdraw(accountNum1, &balance1, tmp);
- }
- else{
- withdraw(accountNum2, &balance2, tmp);
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement