// Tyler Rigsby, CSE 142 // Produces chants by repeating lines public class Chant { public static void main(String[] args) { winter(5); winter(8 - 6); winter(5 % 4); // winter(); // this would cause an error; winter must take one int parameter // winter(2.7); // this would also cause an error; 2.7 can't be resolved to an int } // Prints "Winter is coming..." the specified number of times, then "Winter is here!" public static void winter(int times) { for (int i = 1; i <= times; i++) { System.out.println("Winter is coming..."); } System.out.println("Winter is here!"); System.out.println(); } }