Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Goddamn assembly...

Name: Anonymous 2007-03-29 23:33 ID:1vfRpdnx

For an assignment, I need to use MIPS to create a program that will check a number to see if it's a perfect number (All factors add up to the number.)  I have no freaking clue how to go about doing this.  It seems like I'd have to have it check every number before it to see if it's a factor, then add them all up to check to see if they work.  This seems kinda insane since it's more of a beginner class...

How would I go about even beginning something like this?  Is there any easier way to do it?

Name: Anonymous 2007-03-29 23:39 ID:pSRBsz5S

you only have to check each number up to and including the square root of, every factor (save the root itself) thus determined will have a corresponding factor which can be worked out by simple division.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List