Some of you really aren't understanding what a remainder is. I am quite surprised at this as most computing languages (not BASIC) include a command called MOD() which will return a remainder, and it can be very useful.

A remainder occurs when a number cannot be divided into another number evenly. The value of the remainder is the original number minus the nearest lower number that CAN be divided evenly.

For example:

15 cannot be divided evenly into 6; but 12 can.

so 15/6 = 2 (12/6) remainder 3 (15-12).

Is that any clearer?

Here is my function to give Remainders (You could even use it in this program if you want

)

I haven't fully tested it but it seems to work, all the numbers must be real# or it will return 0. Don't know why but that caused me a lot of hassle

input "input number> "; num1#
input "input number> "; num2#
print "Remainder: "; mod(num1#,num2#)
END
FUNCTION mod(num1#,num2#)
dec# = num1#/num2#
dec# = dec# - int(dec#)
mod# = dec# * num2#
ENDFUNCTION mod#

My code finds the remainder in a different way to my explanation. Although it is easier for the human brain to use the "next even divider" a computer can do this. So what i have done is to take the decimal from the division and multiply it by the second number, if you think of this in equation terms (im sure you've all balanced equations at school) this action puts the decimal back onto the left side of the equation.

Aaah i cant explain very well

decimal = 0.?? number less than 1.

Your signature has been erased by a mod because it was rubbish.