Computer Science Canada

Generating Random Values each time

Author:  hamid14 [ 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

Author:  hamid14 [ Tue Nov 24, 2009 12:09 pm ]
Post subject:  Re: Generating Random Values each time

i figured it out, nvm.

Author:  B-Man 31 [ Wed Nov 25, 2009 9:26 pm ]
Post subject:  RE:Generating Random Values each time

lol, a loop ?


: