Computer Science Canada

Random numers

Author:  aldreneo [ Wed Apr 26, 2006 7:18 pm ]
Post subject:  Random numers

I must look dumb.....
How do I do random numbers?
is it like
code:

var cow=rand(10)

Author:  Clayton [ Wed Apr 26, 2006 7:32 pm ]
Post subject: 

not quite
code:

%you could do the suggested method
var a:int
a:=Rand.Int(1,5)
%or you could do this
var a:int
randint(a,1,5)

the reason Rand.Int is suggested is it leads you into more complex programming ideas

Author:  Clayton [ Wed Apr 26, 2006 7:33 pm ]
Post subject: 

another thing, if you ever have any questions look through the Turing Walkthrough which explains just about anything you would need to know


: