Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- float bal1 = 10500.00, wdr4w, depot;
- char lo4d='y', sel1;
- while (lo4d=='y'||lo4d=='Y') {
- system("clear");
- cout <<" Automated Teller Machine\n\n" <<"- - - - - - - - - - - - - - - - -\n" <<" [B]alance\n [W]ithdraw\n [D]eposit\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Enter Selection: ";
- cin >> sel1;
- cout <<"- - - - - - - - - - - - - - - - -\n";
- if (sel1=='B'||sel1=='b') {
- system("clear");
- 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]: ";
- cin >> lo4d;
- cout <<"- - - - - - - - - - - - - - - - -\n";
- } else if (sel1=='W'||sel1=='w') {
- system("clear");
- cout <<" Automated Teller Machine\n\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Withdraw Module\n\n" <<" Withdraw Amount: ";
- cin >> wdr4w;
- cout <<"- - - - - - - - - - - - - - - - -\n";
- bal1 = bal1 - wdr4w;
- cout <<" Current Balance: " << bal1 <<".00\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Transact Again? [Y/N]: ";
- cin >> lo4d;
- cout <<"- - - - - - - - - - - - - - - - -\n";
- } else if (sel1=='D'||sel1=='d') {
- system("clear");
- cout <<" Automated Teller Machine\n\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Deposit Module\n\n" <<" Deposit Amount: ";
- cin >> depot;
- cout <<"- - - - - - - - - - - - - - - - -\n";
- bal1 = bal1 + depot;
- cout <<" Current Balance: " << bal1 <<".00\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Transact Again? [Y/N]: ";
- cin >> lo4d;
- cout <<"- - - - - - - - - - - - - - - - -\n";
- } else {
- system("clear");
- cout <<" Automated Teller Machine\n\n" <<"- - - - - - - - - - - - - - - - -\n\n" <<" Transaction Terminated ! \n\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Account De-activated !\n " <<"- - - - - - - - - - - - - - - - -\n" <<" Transact Again? [Y/N]: ";
- cin >> lo4d;
- cout <<"- - - - - - - - - - - - - - - - -\n";
- } }
- system("clear");
- cout <<" Automated Teller Machine\n\n" <<"- - - - - - - - - - - - - - - - -\n\n" <<" Transaction Terminated ! \n\n" <<"- - - - - - - - - - - - - - - - -\n" <<" Process Ended !" <<"\n" <<"- - - - - - - - - - - - - - - - -\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment