home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / 351-375 / apd371 / docs / factors.doc < prev    next >
Text File  |  1991-03-31  |  1KB  |  34 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                 F a c t o r s
  8.                                ===============
  9.  
  10.                    Quite a useful program, by Ben Ashley
  11.  
  12. Factors are quite interesting aren't they?  Except when you have to work
  13. them out.  This program, is useful, because basically it does it all for
  14. you, AND produces a line-form, using the factors.
  15.  
  16. As soon as you run the program, you'll be asked to enter a number.  That's
  17. all there is to it.  Then, it will work them out, and display a lineform.
  18.  
  19. After all of this, you'll be asked whether or not you wish to DISPLAY the
  20. factors, PRINT the factors, AGAIN or QUIT.  If you select display, all the
  21. factors will be displayed, and what they add up to.  Selecting PRINT will
  22. do the same, but the result will come on the printer.  AGAIN allows you to
  23. enter another number, whilst QUIT surprisingly QUITS.
  24.  
  25. After you have selected DISPLAY or PRINT, you'll be prompted for another
  26. number.
  27.  
  28. How does it work ?
  29. ------------------
  30. Simple.  First it gets the number.  Then 2 FOR..NEXT loops, count up to the
  31. number divided by 2, ( No factors of a number, are higher than the number's
  32. half ).  It multiplies the 2 count numbers, and see's if they equal the
  33. number.  If they do, then the first counter is stored, and the loop
  34. continues.