www.jupiter-ace.co.uk

Previous Page > Software Index > DIVN .


Name DIVN
Year of release 2007
Publisher Ricardo Fernandes Lopes
Producer / Author(s) Ricardo Fernandes Lopes
Memory 3k
Type Util
Original Cost PD
Instructions
A code to divide a number to n places using integer maths.

22 7 20 /n will return

3.14285714285714285714

	
Algorithm:
________________

x = a/b
a = a - b*x
print x.
loop from 1 to n:
	a = 10*a
	x = a/b
	a = a - b*x
	print x
end loop
		 

You can read the code in the listing archive

Downloads Tap file Wave file
  Blaze file Wave file
Screen shot

Click here to go back