No. That would make it too easy for an unauthorized person to figure out the combination
You find out if you have used the correct combination only after you have entered all three numbers. Then, if the lock fails to open, you have to try again from the beginning. The flowchart that shows how the lock works.
The flowchart uses a variable correct
that is initialy set to true
,
but is set to false
as soon as
a wrong number is entered.
It is tested after all three numbers
have been entered to determine
if the lock is to open,
or not.