Computer Science Canada

Turing

Author:  ovechkin [ 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]

Author:  DemonWasp [ 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.

Author:  hossack [ Thu Mar 26, 2009 1:06 pm ]
Post subject:  RE:Turing

num4=num1*num2*num3
put num4

num4=num1+num2+num3
put num4

Author:  blankout [ 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 **

Author:  BigBear [ 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)

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


: