Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Login In Turing
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
namansetia




PostPosted: Sun Dec 07, 2014 1:51 pm   Post subject: Login In Turing

What is it you are trying to achieve?
<Replace all the <> with your answers/code and remove the <>>


What is the problem you are having?
<Answer Here> In turing, how do I create a login for the user?


Describe what you have tried to solve this problem
<Answer Here>


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:


<Add your code here>



Please specify what version of Turing you are using
<Answer Here>
Sponsor
Sponsor
Sponsor
sponsor
asdfasdf123




PostPosted: Wed Dec 17, 2014 12:08 pm   Post subject: Re: Login In Turing

Here's how I would do it:
Turing:

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

Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: