/* CSE 142, Autumn 2009, Marty Stepp This enhanced version of the ComplexLines program prints the following pattern of lines using nested loops: ....1 ...2. ..3.. .4... 5.... The program has a variable named 'max' that you can change to adjust how many lines of numbers are printed. */ public class ComplexLines2 { public static void main(String[] args) { int max = 5; for (int line = 1; line <= max; line++) { // dots before line number for (int dot = 1; dot <= (-1 * line + max); dot++) { System.out.print("."); } // line number System.out.print(line); // dots after line number for (int dot = 1; dot <= line - 1; dot++) { System.out.print("."); } // end the line of output System.out.println(); } } }