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

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




PostPosted: Thu Mar 26, 2009 10:04 am   Post subject: Turing

Turing:
var num1,num2,num3,num4:int
put"what is your first number"
get num1
put"what is your second number"
get num2
put"what is your third number"
get num3
num4=num1+num2+num3






need help how do you multiply and add the three numbers togther

Mod Edit: Remember to use syntax tags! Thanks Smile
code:
[syntax="turing"]Code Here[/syntax]
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Thu Mar 26, 2009 10:19 am   Post subject: RE:Turing

Multiply with *, add with +. If that doesn't answer your question, you need to restate it so we can know what you're asking.
hossack




PostPosted: Thu Mar 26, 2009 1:06 pm   Post subject: RE:Turing

num4=num1*num2*num3
put num4

num4=num1+num2+num3
put num4
blankout




PostPosted: Fri Apr 03, 2009 3:54 pm   Post subject: Re: Turing

for one thing its num4:=num1...
and yes multiplying is simply * adding is + subtracting is - and division is /
also exponentiation is **
BigBear




PostPosted: Fri Apr 03, 2009 4:54 pm   Post subject: RE:Turing

Note / will divide and return a real number where as div is integer division and return integers (whole numbers)
blankout




PostPosted: Fri Apr 03, 2009 4:56 pm   Post subject: Re: Turing

also, mod will return only the remainder of the division.

e.g. 24 mod 9 = 6
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  [ 6 Posts ]
Jump to:   


Style:  
Search: