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

Username:   Password: 
 RegisterRegister   
 Generating Random Values each time
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
hamid14




PostPosted: Tue Nov 24, 2009 12:00 pm   Post subject: Generating Random Values each time

What is it you are trying to achieve?
I want the values for a number change after every guess. I have two numbers. It gives you the previous number and you have to guess if the next number will be higher or lower or the same.I want the next number to change randomly and the previous number to stay the same.


What is the problem you are having?
The problem is that the values stay the same after each guess.


Describe what you have tried to solve this problem
I've tried making arrays, but that is too long. I

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


Turing:


var previousnumber : int := Rand.Int (1,10)
var nextnumber : int := Rand.Int (1,10)



Please specify what version of Turing you are using
4.1
Sponsor
Sponsor
Sponsor
sponsor
hamid14




PostPosted: Tue Nov 24, 2009 12:09 pm   Post subject: Re: Generating Random Values each time

i figured it out, nvm.
B-Man 31




PostPosted: Wed Nov 25, 2009 9:26 pm   Post subject: RE:Generating Random Values each time

lol, a loop ?
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  [ 3 Posts ]
Jump to:   


Style:  
Search: