Created
April 27, 2012 08:03
-
-
Save editnuki/2507265 to your computer and use it in GitHub Desktop.
Triangle
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 Triangle{ | |
public static void main(String[] args){ | |
int i = 0; | |
int j = 0; | |
for (i = 0; i < 11; i++){ | |
for (j = 0; j < i; j++){ | |
System.out.print("*"); | |
} | |
System.out.println(""); | |
} | |
for (i = i; i > 0; i = i - 1){ | |
for (j = i - 2; j > 0; j = j -1){ | |
System.out.print("*"); | |
} | |
System.out.println(""); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment