VEN JOE CANUMAY
ALGORITHM FOR ATM CARD MACHINE
*Declare Variables
*Create File Pointers
*Display Menu
*Receive value for menu
If option == 1
ADD ACCOUNT
Open [Link] as append
Enter pin code you want to add
Enter the amount u have on your atm
Print on the [Link]
Close file
If option == 2
CHECK BALANCE
Open [Link] as read
Enter pin code u want to show balance
Display the balance
Close file
If option == 3
CHANGE PIN CODE
Open [Link] as read
Open [Link] as write
Enter your old pin code
Scan the pin code in [Link]
If the pin code you entered is equal to the text file
Enter your new pin code
Print the pin code to the [Link]
Close both files
Open [Link] as write, open [Link] as read
Create a loop to scan the [Link]
Scan the [Link] and print all the text on the [Link]
Close both files
If option == 4
WITHDRAW
Open [Link] as read
Open [Link] as write
Enter pin code
Create a loop to find the pin code you entered is in [Link]
If entered correct pin code, proceed
Enter the amount to withdraw
Use operation to compute for withdraw (nb = cb - amt;)
Print the amount withdrawed, print your new balance
Print it to [Link]
Close both files
Open [Link] as write
Open [Link] as read
Create a loop to scan the [Link]
Then Print all the text in the [Link]
Close both files
If option == 5
EXIT
Exit the program