Rainrix2001

prob5

Aug 27th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.30 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. float bal1 = 10500.00, wdr4w, depot;
  5. char lo4d='y', sel1;
  6. while (lo4d=='y'||lo4d=='Y') {
  7. system("clear");
  8. cout <<"    Automated Teller Machine\n\n" <<"- - - - - - - - - - - - - - - - -\n" <<" [B]alance\n [W]ithdraw\n [D]eposit\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Enter Selection: ";
  9. cin >> sel1;
  10. cout <<"- - - - - - - - - - - - - - - - -\n";
  11. if (sel1=='B'||sel1=='b') {
  12. system("clear");
  13. cout <<"    Automated Teller Machine\n\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Balance Inquiry Module\n\n" <<" Current Balance: " << bal1 <<".00\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Requested Processed !\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Transact Again? [Y/N]: ";
  14. cin >> lo4d;
  15. cout <<"- - - - - - - - - - - - - - - - -\n";      
  16. } else if (sel1=='W'||sel1=='w') {
  17. system("clear");
  18. cout <<"    Automated Teller Machine\n\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Withdraw Module\n\n" <<" Withdraw Amount: ";
  19. cin >> wdr4w;
  20. cout <<"- - - - - - - - - - - - - - - - -\n";
  21. bal1 = bal1 - wdr4w;
  22. cout <<" Current Balance: " << bal1 <<".00\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Transact Again? [Y/N]: ";
  23. cin >> lo4d;
  24. cout <<"- - - - - - - - - - - - - - - - -\n";
  25. } else if (sel1=='D'||sel1=='d') {
  26. system("clear");
  27. cout <<"    Automated Teller Machine\n\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Deposit Module\n\n" <<" Deposit Amount: ";
  28. cin >> depot;
  29. cout <<"- - - - - - - - - - - - - - - - -\n";
  30. bal1 = bal1 + depot;
  31. cout <<" Current Balance: " << bal1 <<".00\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Transact Again? [Y/N]: ";
  32. cin >> lo4d;
  33. cout <<"- - - - - - - - - - - - - - - - -\n";
  34. } else {
  35. system("clear");
  36. cout <<"    Automated Teller Machine\n\n" <<"- - - - - - - - - - - - - - - - -\n\n" <<" Transaction Terminated ! \n\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Account De-activated !\n " <<"- - - - - - - - - - - - - - - - -\n" <<" Transact Again? [Y/N]: ";
  37. cin >> lo4d;
  38. cout <<"- - - - - - - - - - - - - - - - -\n";
  39. } }
  40. system("clear");
  41. cout <<"    Automated Teller Machine\n\n" <<"- - - - - - - - - - - - - - - - -\n\n" <<"    Transaction Terminated ! \n\n" <<"- - - - - - - - - - - - - - - - -\n" <<"         Process Ended !" <<"\n" <<"- - - - - - - - - - - - - - - - -\n";
  42. return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment