Read the first two chapters in Toal and Dionisio.
Make these:
A JavaScript program that determines whether an arbitrary year happens to be a Leap Year. Your algorithm should be able to handle any year above 1599. So, for example, your algorithm should say LEAP YEAR for years like 1996 and 2000, and it should say NOT A LEAP YEAR for years like 1700, 1800, 1900, and 1995.
A JavaScript program that determines whether any given (positive) whole number is a prime. For example, for inputs 23 and 61, your algorithm should say PRIME, but for inputs 1, 12, and 35, it should say NOT PRIME.
A JavaScript program that determines whether the letters of a given word happen to be in alphabetical order. For example, your algorithm should say ALPHABETICAL for words like ACT and ADS, and NOT ALPHABETICAL for words like CATS and DOGS.
To submit your programs, send each one in a separate email containing just the instructions for that one program... nothing else! Use these exact subject lines for your emails:
Revised at 23:50 on 24 September 2009