Skip to main content
1 of 3
TheNumberOne
  • 11.6k
  • 1
  • 38
  • 70

#Java, 85 bytes

This is surprisingly short in Java.

void a(int a){String b="";for(int c=0;c++<a;System.out.println(b))b+=(c>1?" ":"")+c;}

Indented:

void a(int a){
    String b="";
    for(int c=0;c++<a;System.out.println(b))
        b+=(c>1?" ":"")+c;
}
TheNumberOne
  • 11.6k
  • 1
  • 38
  • 70