CSCI 4230
Software Tools
Fall 1999
Homework #6


Due date: October 26, 1999 (Tuesday)

(1)    Write a HTML/Javascript program perfectnumber.html to test whether a user-supplied number is perfect.  A number is perfect if and only if all its factors, including 1, add up to itself.  For example, 6 is a perfect number as its factors are 1, 2 and 3, which adds up to 6.  The following is a session of using the page.  When the number 28 is entered and return, the page shows true in the second text box.

(2)    Write a simple dynamic HTML program to show quotes in a cyclic manner every 5 seconds.  The background color should be randomly set every time.  For example:

Another screen shot:

Note that your program should work with version 4+ of both Netscape's Navigator and Microsoft's Internet Explorer.  It does not need to handle window resizing.