pseudo code for atm

Hello,
I'm doing computing for a first time and got stuck on this task.
I really need help. How should I write (simple) pseudo code using loop to check the entered PIN against customers stored PIN when I have unlimited attempts. Also what are variables required for the checking PIN.

How should I write (simple) pseudo code

Write down what you think the ATM is doing to verify the PIN that they enter against the correct PIN.
1. Overall process
> ask for a PIN
> compare asked PIN against correct PIN
> keep asking and comparing until PIN is correct
2. Elaborate details
> get each digit of the PIN
> compare each digit to the corresponding correct digit
> keep doing this until all the digits are correct
3. Convert to pseudocode
repeat
   read 4 digits
   for each digit
       compare digit with correct digit
until   every digit is correct

That Pseudocode should help get you started, but I would suggest putting more in there, such as variables

Also what are variables required for the checking PIN.

What will the ATM have to "remember" to do the task of verifying a PIN?
Last edited on
Topic archived. No new replies allowed.