Skip to content

Instantly share code, notes, and snippets.

@editnuki
Created June 9, 2012 06:00
Show Gist options
  • Save editnuki/2899703 to your computer and use it in GitHub Desktop.
Save editnuki/2899703 to your computer and use it in GitHub Desktop.
引数の数分の三角形を作るクラス
public class Triangle{
public static void main(String[] args) {
for (int i = 0; i < args.length; i++){
for (int j = 0; j < i + 1; j++) {
System.out.print("*");
}
System.out.println("");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment