@Override public List<OUT> getInput() { List<OUT> out = new ArrayList<OUT>(); for (IN elem : input.getInput()) { out.add(translate(elem)); } return out; }
public void printRightTriangle() { int number = input.getInput(); int i, j; for (i = 0; i < number; i++) { for (j = number; j > number - i - 1; j--) System.out.print("* "); System.out.print("\n"); } }
public void printIsoscelesTriangle() { int number = input.getInput(); int i, j, temp; temp = number; for (i = 0; i <= number; i++) { for (j = 1; j < temp + 1; j++) System.out.print(" "); temp--; for (j = 1; j <= 2 * i - 1; j++) System.out.print(" *"); System.out.printf("\n"); } }