December 22, 2018
Check perfect number
Threads: Write test program 1 there is the perfect number does not? Perfect number is a positive integer equal the sum of the positive divisors 2 times it. example No. 6 the Convention 1, 2, 3, 6 and total 1 + 2 + 3 + 6 = 12 (equal 2 time 6).
Input: A single integer.
Output: “TRUE” if that's the perfect number, “FALSE” otherwise
For example:
input: 6 output: TRUE
You are not logged in? Log in to Submit Now!
5 Comments
Add a Comment
You must be logged in to post a comment.
What is IN QUEUe?
At that time, the system did not handle it in time. Please resubmit.
maintenance for so long, admin
You're done.
printf (“%s”, sum – 2 * n ? “TRUE” : “FALSE”);
Why do I use it like that and it gives the opposite answer?