I need to to write a method that is called like printTriangle(5);. We need to create an iterative method and a recursive method (without ANY iteration). The out
printTriangle(5);
i think this should do it
public void printTriangle (int count) { if(count >= 0) { printTriangle(count-1); for(int i = 0; i < count; i++) { System.out.print("*" + " "); } System.out.println(); } }