
-----------------------------------
safwat
Fri Jun 15, 2007 9:52 am

Math Help
-----------------------------------
Hi i need help in making math equations in turing. Like finding area of shapes, circumference of circle, adding, subtracting, dividing and multiplying

-----------------------------------
neufelni
Fri Jun 15, 2007 10:03 am

RE:Math Help
-----------------------------------
It's really no different than on paper.


put "Area of a 2 x 2 square is: ", 2 * 2
put "3 multiplied by 5 is: ", 3 * 5


However, you probably will want to use variables.

var A, l, w : int
l := 2
w := 2
A := l * w
put "Area: ", A


-----------------------------------
HeavenAgain
Fri Jun 15, 2007 10:17 am

RE:Math Help
-----------------------------------
wrong section :D this is the tutorials section
and for adding, subtracting, dividing etc, its pretty easy
but first you have to understand int, and real, and maybe variables (they are very handy)

1*3    