/*
 * TwoTriangles.java
 * Computer Science S-111
 * 
 * This is an unstructured version of a program that prints
 * two triangular-shaped figures composed of copies of
 * a single character. It's unstructured because everything
 * is done in the main method.
 * 
 * See TwoTrianglesStructured.java for a structured version --
 * one that uses a separate method that prints a triangle.
 */

public class TwoTriangles {
    public static void main(String[] args) {
        char ch = '*';      // character used in printing
        int smallBase = 5;  // base length of smaller triangle
        
        // Print the small triangle.
        for (int line = 1; line <= smallBase; line++) {
            for (int i = 0; i < line; i++) {
                System.out.print(ch);
            }
            System.out.println();
        }
        
        // Print the large triangle.
        for (int line = 1; line <= 2 * smallBase; line++) {
            for (int i = 0; i < line; i++) {
                System.out.print(ch);
            }
            System.out.println();
        }
    }
}