Author |
Message |
ovechkin
|
Posted: 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 code: | [syntax="turing"]Code Here[/syntax] |
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
DemonWasp
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
hossack
|
Posted: Thu Mar 26, 2009 1:06 pm Post subject: RE:Turing |
|
|
num4=num1*num2*num3
put num4
num4=num1+num2+num3
put num4 |
|
|
|
|
![](images/spacer.gif) |
blankout
|
Posted: 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 ** |
|
|
|
|
![](images/spacer.gif) |
BigBear
|
Posted: 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) |
|
|
|
|
![](images/spacer.gif) |
blankout
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
|