please tell me how to write a java program to find factors of given number
java program
Collapse
X
-
Do you know what the '%' (modulo) operator does? Its result is the remainderOriginally posted by hdeviplease tell me how to write a java program to find factors of given number
r of its operands n and d such that n= (n/d)*d+r, e.g. 7%3 == 1 and 12%5 == 2.
You'll need that operator if you want to find divisors d of a number n because
n%d will be equal to zero then.
kind regards,
Jos -
Hi,
Please write a sample code / snippet that will show this program. From that code we might be able to help... ok? try the modulus operator that jos told you.
Best Regards,
JeffComment
Comment