Created
August 14, 2013 12:33
-
-
Save anonymous/6230646 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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