| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Files spread between Dropbox, Google Drive, Gmail, Slack, and more? Dokkio, a new product from the PBworks team, integrates and organizes them for you. Try it for free today.

View
 

Exercise 11 Q4

Page history last edited by Steve Sweeney 11 years ago

/* 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"

 

Comments (0)

You don't have permission to comment on this page.