import element.*; public class MonthTable { public static void main(String args[]) { ConsoleWindow c = new ConsoleWindow(); int daysInMonth[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; String monthName[] = { "January","February","March","April", "May","June","July","August","September", "October", "November", "December" }; int i, shortest; c.out.println("Long months:"); for (i = 0; i < 12; i++) { if (daysInMonth[i] == 31) c.out.println(monthName[i]); } c.out.print("A shortest month is "); shortest = 0; for (i = 1; i < 12; i++) { if (daysInMonth[i] < daysInMonth[shortest]) shortest = i; } c.out.println(monthName[shortest]+"."); } } /* Long months: January March May July August October December A shortest month is February. */