Perl Program

0 comments

Create a PERL program as follows:

  • Read a user’s input
  • Create a menu for 5 operations:

Menu

  • Enter a deposit
  • Withdrawal
  • Check balance
  • Show all the transactions
  • Exit program

3] if and elsif for menu checking.

4] make a do while loop for this menu and exit with last.

5] each transaction should be stored (recorded) in @transaction array and the balance will be stored in $balance variable.

6] The user will provide transaction type (DEP for deposit and WD for withdraw), date of transaction, comment, and amount of transaction for withdrawal and deposit.

The transaction samples are:

DEP:11/20/2019:Paycheck:2000

WD:11/21/2019:ATM withdrawal:100

Sample data input:

Deposit 11/20/2019 Paycheck 1000

Withdraw 11/21/2019 ATM 100

Withdraw 11/22/2019 InternetBanking 80

Deposit 11/23/2019 ATM 200

Withdraw 11/24/2019 ATM 50

[check balance]

Account balance is: $970.00

[show all the transactions]

[Exit]

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}