This pseudocode summarizes the logic for calculating account balances and fees for saving and checking bank accounts. It takes in the account number, code, and initial balance as input. It then determines the account type, calculates any fees or interest earned based on the balance, and outputs the updated balance along with details of the calculations. Key steps include using if/else statements to check the account code and balance, setting variables for name, fees and interest rate based on the account type and balance, and displaying the output values.
This pseudocode summarizes the logic for calculating account balances and fees for saving and checking bank accounts. It takes in the account number, code, and initial balance as input. It then determines the account type, calculates any fees or interest earned based on the balance, and outputs the updated balance along with details of the calculations. Key steps include using if/else statements to check the account code and balance, setting variables for name, fees and interest rate based on the account type and balance, and displaying the output values.
This pseudocode summarizes the logic for calculating account balances and fees for saving and checking bank accounts. It takes in the account number, code, and initial balance as input. It then determines the account type, calculates any fees or interest earned based on the balance, and outputs the updated balance along with details of the calculations. Key steps include using if/else statements to check the account code and balance, setting variables for name, fees and interest rate based on the account type and balance, and displaying the output values.
Nama Pelajar Maulana Arif bin Samsudin (2014239958) Mohammad Amirul bin Rosli (2014252474)
Nama Pensyarah Puan Zarina binti Zainul Rashid
Tarikh Serahan 22 Ogos 2014 Pseudocode
Begin int acc int bal char accName, code float charge, dividend, total Display "Enter No. Account : " Input acc Display "Enter Account Code (S/C) : " Input code Display "Enter current balance : " Input bal if code == 'S' OR code == 's' accName = "Saving Account" if bal >= 1000 charge = 0 dividend = 4 total = bal + (bal * 0.04) else charge = 10.00 dividend = 0 total = bal - 10 end if end if if code == 'C' OR code == 'c' accName = "Checking Account" if bal >= 7000 charge = 0 dividend = 5 total = bal + bal * 0.05 else if bal <= 5000 dividend = 0 charge = 25.00 total = bal - 25 else if bal > 5000 AND bal < 7000 charge = 0 dividend = 3 total = bal + (bal * 0.03) end if else Display "Error Invalid Code" end if Display "Account No. : ", acc Display "Account Code : ", code Display "Account Name : ", accName Display "Previous Balance : RM", bal Display "Latest Balance : RM", total Display "Service Charge : RM", charge Display "Dividend Receive : ", dividend, "%" End
Input : acc, bal, accName, code, charge, dividend, total
Process : charge = 0 dividend = 4 total = bal + (bal * 0.04) charge = 10.00 dividend = 0 total = bal 10 charge = 0 dividend = 5 total = bal + bal * 0.05 dividend = 0 charge = 25.00 total = bal 25 charge = 0 dividend = 3 total = bal + (bal * 0.03)
Begin Input acc, code, bal Display Enter No. Account : Display Enter Account Code : Display "Enter current balance : " If code==sOR code==S accName=Saving account If bal>=1000 charge = 0 dividend = 4 total = bal + (bal * 0.04) charge = 10 dividend = 0 total = bal - 10 If code==cOR code==C accName=Checking account If bal>=7000 charge = 0 dividend = 5 total = bal + (bal * 0.05) If bal<=5000 dividend = 0; charge = 25.00; total = bal + 25; C A B DisplayInvalid input code Flowchart
B C A charge = 0 dividend = 3 total = bal + (bal * 0.03)
if (bal > 5000 AND bal < 7000) Display "Account No. : ", acc Display "Account Code : ",code Display "Account Name : ", accName Display "Previous Balance : RM",bal; Display "Latest Balance : RM",total Display "Service Charge : RM", charge Display "Dividend Receive : ",dividend End