Hello all,
Im trying to figure out how to get the for loop
for (int i = 1; i <= (11 - 2 * line); i++) {
System.out.print("*");
... to show the method listed at the bottom. I've been able to get the rest of it, just not this part. I had the * to show me if I got the pattern right or not.
Thank you.
public class DrawCone {
public static void main (String[] args) {
drawPattern();
for (int line = 5; line >= 1; line --) {
for (int i = 1; i <= (line - 0); i++) {
System.out.print("-");
}
for (int i = 1; i <= (11 - 2 * line); i++) {
System.out.print("*");
}
for (int i = 1; i <= (line - 0); i++) {
System.out.print("-");
}
System.out.println();
}
}
public static void printDesign() {
System.out.println("-----1-----");
System.out.println("----333----");
System.out.println("---55555---");
System.out.println("--7777777--");
System.out.println("-999999999-");
}
}