Skip to content

Instantly share code, notes, and snippets.

@editnuki
Created April 27, 2012 08:03
Show Gist options
  • Save editnuki/2507265 to your computer and use it in GitHub Desktop.
Save editnuki/2507265 to your computer and use it in GitHub Desktop.
Triangle
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