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

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Exercise 11 Q4

Page history last edited by Steve Sweeney 15 years, 2 months 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.