Saturday, October 20, 2012

Java Exercise #28: Print Calendar

This program is to display the calendar for given month of the year.

Exercise: Write a program that prompts the user to enter the year and the month, and then displays the entire calendar for the month as shown below.


Enter year as int (eg: 2003): 2006
Enter month as int (eg: 1 for January): 6
           June  2006
-----------------------------
 Sun Mon Tue Wed Thu Fri Sat
               1   2   3   4
   5   6   7   8   9  10  11
  12  13  14  15  16  17  18
  19  20  21  22  23  24  25
  26  27  28  29  30


Download Code: Print Calendar

No comments:

Post a Comment