
-----------------------------------
namansetia
Sun Dec 07, 2014 1:51 pm

Login  In Turing
-----------------------------------
What is it you are trying to achieve?



What is the problem you are having?
 In turing, how do I create a login for the user?


Describe what you have tried to solve this problem



Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)








Please specify what version of Turing you are using


-----------------------------------
asdfasdf123
Wed Dec 17, 2014 12:08 pm

Re: Login  In Turing
-----------------------------------
Here's how I would do it:

var username1, username2, password1, password2 : string
% Creating account
put "Sign up"
put "Username: "..
get username1
put "Password: "..
get password1
put ""
% Logging in
put "Log in"
put "Username: "..
get username2
put "Password: "..
get password2
if username2 = username1 and password2 = password1 then
put "You have logged in"
else
put "Username and/or password incorrect."
end if


