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

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




PostPosted: 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)
Sponsor
Sponsor
Sponsor
sponsor
Clayton




PostPosted: Wed Apr 26, 2006 7:32 pm   Post subject: (No 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
Clayton




PostPosted: Wed Apr 26, 2006 7:33 pm   Post subject: (No subject)

another thing, if you ever have any questions look through the Turing Walkthrough which explains just about anything you would need to know
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: