0

hello..

can u tell me how i can determine if a certain number is a perfect number or not?!

please help me..

thanks.

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by mike_2000_17
0

Just read this wiki. There are three easy methods: sum all the number's proper divisors (those with modulus equal to zero) and check if it matches the number; generate one perfect number after another with the given formula until you go beyond the number; check if the bit pattern corresponds to that of a perfect number (the pattern is given in the wiki too).

0

that's ok..

but how can i use a mathmatical method in java.
i mean what the header file i should use?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.