The OP needs to post the algorithm that the code is supposed to implement.
Type: Posts; User: Norm
The OP needs to post the algorithm that the code is supposed to implement.
One of your problems could be due to integer division. There are no fractions. 10/6 = 1