diff --git a/Assignments/MP3_CalebFontenot/src/mp3_calebfontenot/Calendar.java b/Assignments/MP3_CalebFontenot/src/mp3_calebfontenot/Calendar.java index 0e14c98..65c0f64 100644 --- a/Assignments/MP3_CalebFontenot/src/mp3_calebfontenot/Calendar.java +++ b/Assignments/MP3_CalebFontenot/src/mp3_calebfontenot/Calendar.java @@ -21,7 +21,7 @@ public class Calendar { int startDay = firstDay; int numberOfDaysInMonth = 0; for (int month = 1; month <= 12; month++) { - System.out.print(" "); + System.out.print(" "); switch (month) { case 1: System.out.println("January " + year); numberOfDaysInMonth = 31; break; case 2: System.out.println("February " + year); @@ -39,19 +39,20 @@ public class Calendar { case 11: System.out.println("November " + year); numberOfDaysInMonth = 30; break; case 12: System.out.println("December " + year); numberOfDaysInMonth = 31; break; } - System.out.println("-----------------------------"); + System.out.println("------------------------------------------"); System.out.println(" Sun Mon Tue Wed Thu Fri Sat"); int i = 0; for (i = 0; i < startDay; i++) { - System.out.print(" "); + System.out.print(" "); } - for (i = 1; i <= numberOfDaysInMonth; i++) - if (i < 10) System.out.print(" " + 1); - else System.out.print(" " + 1); + for (i = 1; i <= numberOfDaysInMonth; i++) { + if (i < 10) System.out.print(" " + i); + else System.out.print(" " + i); if ((i + startDay) % 7 == 0) { System.out.println(); } + } System.out.println(); System.out.println(); startDay = (startDay + numberOfDaysInMonth) % 7;