Hello,
Plz help me wth pseudocode of the above mentioned and also determing whether a number is a divisor of another number. If you are not sure abt the pseudocode u can give me c# code il try and convert it.
thnks
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jun 14, 2011, 2:16 PM EDT
VulpesRank #55 · 29.2K reputationPosted Jun 14, 2011, 10:37 AM EDT
All of these use a straightforward 'brute force' approach rather than some of the 'clever' methods which exist for generating these numbers more quickly.
Avuya MxoliRank #7,940 · 231 reputationPosted Jun 14, 2011, 11:05 AM EDT
I have something like for perfect number:
function IsPerfect(integer:n)
{
integer sum =0;
integer j;
FOR j goes from 1 to (n/2)
IF n MOD j EQUALS 0
sum = sum + j;
END IF
END FOR
IF sum EQUALS n
WRITE("perfect number");
ELSE
WRITE("not a perfect number")
END FUNCTION
}
Avuya MxoliRank #7,940 · 231 reputationPosted Jun 15, 2011, 12:16 AM EDT