Skip to main content
Commonmark migration
Source Link

#Java, 116 bytes

Java, 116 bytes

c->{for(int i=0;i<c;i++)System.out.format("%"+(5+c-i)+"s%"+(i<3?i*2+1:2*(i-2))+"s%5s\n","/----/","\\",i<3?"":"\\");};

Unfortunately, you can't [easily] duplicate strings in Java, so I end up abusing the format function.

#Java, 116 bytes

c->{for(int i=0;i<c;i++)System.out.format("%"+(5+c-i)+"s%"+(i<3?i*2+1:2*(i-2))+"s%5s\n","/----/","\\",i<3?"":"\\");};

Unfortunately, you can't [easily] duplicate strings in Java, so I end up abusing the format function.

Java, 116 bytes

c->{for(int i=0;i<c;i++)System.out.format("%"+(5+c-i)+"s%"+(i<3?i*2+1:2*(i-2))+"s%5s\n","/----/","\\",i<3?"":"\\");};

Unfortunately, you can't [easily] duplicate strings in Java, so I end up abusing the format function.

Source Link
user55852
user55852

#Java, 116 bytes

c->{for(int i=0;i<c;i++)System.out.format("%"+(5+c-i)+"s%"+(i<3?i*2+1:2*(i-2))+"s%5s\n","/----/","\\",i<3?"":"\\");};

Unfortunately, you can't [easily] duplicate strings in Java, so I end up abusing the format function.