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

Username:   Password: 
 RegisterRegister   
 Turing Help ( Variables, and how they work )
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
replay




PostPosted: Thu Oct 30, 2008 8:44 pm   Post subject: Turing Help ( Variables, and how they work )

Well, i kinda lost my note about this from class today.. and i needa do homework so...
anybody know the rule for the variables when u use " / " , " mod " and " div" ?
for example
expression = x : 11 mod 2.5
data type of x = real, or integer?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Oct 30, 2008 8:49 pm   Post subject: RE:Turing Help ( Variables, and how they work )

You need to know the difference between int and real types. You also need to know what kind of a value each of those operations return. Then match the two up.

You could always just set up some super simple test cases in Turing, and see what kind of answers they return.

Turing:

put 5 div 2

Should make it pretty obvious as to how div is different from /
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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: