COS 126 Conditionals and Loops |
Programming Assignment Due: 11:59pm |
The goal of this assignment is to write five short Java programs so that you get used to writing code and debugging it. Do five of the following seven exercises. All questions have equal weight. Feel free to do more than five, but we will choose which ones to grade if you submit more than the required amount.
SIGN | FROM | TO |
---|---|---|
Capricorn | December 22 | January 19 |
Aquarius | January 20 | February 17 |
Pisces | February 18 | March 19 |
Aries | March 20 | April 19 |
Taurus | April 20 | May 20 |
Gemini | May 21 | June 20 |
Cancer | June 21 | July 22 |
Leo | July 23 | August 22 |
Virgo | August 23 | September 22 |
Libra | September 23 | October 22 |
Scorpio | October 23 | November 21 |
Sagittarius | November 22 | December 21 |
* * * * * * * * * * * * * * * *
Hint: consider using (i % 10) and (i % 100) to determine when to use "st", "nd", "rd", or "th" for printing the ith Hello.% java Ordinals 22 1st Hello 2nd Hello 3rd Hello 4th Hello 5th Hello ... 10th Hello 11th Hello 12th Hello 13th Hello ... 20th Hello 21st Hello 22nd Hello