Skip to content

Instantly share code, notes, and snippets.

Created August 14, 2013 12:33
Show Gist options
  • Save anonymous/6230646 to your computer and use it in GitHub Desktop.
Save anonymous/6230646 to your computer and use it in GitHub Desktop.
public class CaleDrzewo {
public static void main(String[] agre) {
int wysokoscDrzewa = 12;
int i2 = 0;
int j2 = 1;
int i = 0;
int j = 1;
int x = 0;
int y = 8;
int w = 6;
while (wysokoscDrzewa > 0) {
x = y--;
if (i < 8) {
while (x > 0) {
System.out.print(" ");
x--;
}
}
if (i < 8) {
while (i > 0) {
System.out.print("*");
i--;
}
} else {
while (w > 0) {
System.out.print(" ");
w--;
}
w = 6;
System.out.print("**");
}
if (i2 < 8) {
while (i2 > 0) {
System.out.print("*");
i2--;
}
} else {
System.out.print("**");
}
System.out.println("*");
i2 = j2++;
i = j++;
wysokoscDrzewa--;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment