Exercise 11 Q4


/* Create a program that checks user name and password.

 Think carefully how you want to handle each of these

 (i.e., you don't want to give an invalid user

 information they could use to hack into the system!).

 Start with a single user.

 */

 

var username, password : string

 

loop

 

    put "User Name: " ..

    get username

 

    put "Password: " ..

    get password

   

    put ""              % add an extra line for nice output

   

    exit when (username = "user") and (password = "pass")

 

end loop

 

put "Access granted"