Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1.  
  2. case 3:
  3.  
  4. while((tmp!=accountNum1)||(tmp!=accountNum2)){
  5.  
  6. printf("Enter an account to withdraw (%d or %d?): ", accountNum1,accountNum2);
  7. scanf("%d", &tmp);
  8.  
  9.  
  10. if((tmp!=accountNum1)||(tmp!=accountNum2))
  11. printf("invalid account number.\n");
  12.  
  13. }
  14. printf("Enter an amount to withdraw: ");
  15. scanf("%d", &tmp);
  16.  
  17. //input validation
  18.  
  19. if (tmp== accountNum1){
  20. withdraw(accountNum1, &balance1, tmp);
  21. }
  22. else{
  23. withdraw(accountNum2, &balance2, tmp);
  24. }
  25.  
  26. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement