Skip to main content
Commonmark migration
Source Link

#perl 109 108 106

perl 109 108 106

$i=<>;$t=join$/,$i-1?" "."_"x($i/2)x4:(),$m.=(" /")[$_&1]||"\\ ",$b.=("/")[$_&1]||"__\\"for 0..$i;print$t 

I think this is alright for my first golf, I used Vynce's section for the first line, with the rest of my code to get past the new line problem with 1 triangle.

Now to see if I can shorten it :)

Edit: Whitespace

Edit 2: replaced "\n" with $/

1: /\ /__\ 4: ________ /\ /\ / /__\/__\/ 

#perl 109 108 106

$i=<>;$t=join$/,$i-1?" "."_"x($i/2)x4:(),$m.=(" /")[$_&1]||"\\ ",$b.=("/")[$_&1]||"__\\"for 0..$i;print$t 

I think this is alright for my first golf, I used Vynce's section for the first line, with the rest of my code to get past the new line problem with 1 triangle.

Now to see if I can shorten it :)

Edit: Whitespace

Edit 2: replaced "\n" with $/

1: /\ /__\ 4: ________ /\ /\ / /__\/__\/ 

perl 109 108 106

$i=<>;$t=join$/,$i-1?" "."_"x($i/2)x4:(),$m.=(" /")[$_&1]||"\\ ",$b.=("/")[$_&1]||"__\\"for 0..$i;print$t 

I think this is alright for my first golf, I used Vynce's section for the first line, with the rest of my code to get past the new line problem with 1 triangle.

Now to see if I can shorten it :)

Edit: Whitespace

Edit 2: replaced "\n" with $/

1: /\ /__\ 4: ________ /\ /\ / /__\/__\/ 
deleted 3 characters in body
Source Link
Optimizer
  • 26.6k
  • 7
  • 67
  • 144

perl 109 108 106 #perl 109 108 106

$i=<>;$t=join$/,$i-1?" "."_"x($i/2)x4:(),$m.=(" /")[$_&1]||"\\ ",$b.=("/")[$_&1]||"__\\"for 0..$i;print$t 

I think this is alright for my first golf, I used Vynce's section for the first line, with the rest of my code to get past the new line problem with 1 triangle.

Now to see if I can shorten it :)

Edit: Whitespace

Edit 2: replaced "\n" with $/

1: /\ /__\ 4: ________ /\ /\ / /__\/__\/ 

perl 109 108 106

$i=<>;$t=join$/,$i-1?" "."_"x($i/2)x4:(),$m.=(" /")[$_&1]||"\\ ",$b.=("/")[$_&1]||"__\\"for 0..$i;print$t 

I think this is alright for my first golf, I used Vynce's section for the first line, with the rest of my code to get past the new line problem with 1 triangle.

Now to see if I can shorten it :)

Edit: Whitespace

Edit 2: replaced "\n" with $/

1: /\ /__\ 4: ________ /\ /\ / /__\/__\/ 

#perl 109 108 106

$i=<>;$t=join$/,$i-1?" "."_"x($i/2)x4:(),$m.=(" /")[$_&1]||"\\ ",$b.=("/")[$_&1]||"__\\"for 0..$i;print$t 

I think this is alright for my first golf, I used Vynce's section for the first line, with the rest of my code to get past the new line problem with 1 triangle.

Now to see if I can shorten it :)

Edit: Whitespace

Edit 2: replaced "\n" with $/

1: /\ /__\ 4: ________ /\ /\ / /__\/__\/ 
added 66 characters in body
Source Link
Caek
  • 111
  • 6

perl 109 108108 106

$i=<>;$t=join"\n"$i=<>;$t=join$/,$i-1?" "."_"x($i/2)x4:(),$m.=(" /")[$_&1]||"\\ ",$b.=("/")[$_&1]||"__\\"for 0..$i;print$t 

I think this is alright for my first golf, I used Vynce's section for the first line, with the rest of my code to get past the new line problem with 1 triangle.

Now to see if I can shorten it :)

Edit: Whitespace: Whitespace

Edit 2: replaced "\n" with $/

1: /\ /__\ 4: ________ /\ /\ / /__\/__\/ 

perl 109 108

$i=<>;$t=join"\n",$i-1?" "."_"x($i/2)x4:(),$m.=(" /")[$_&1]||"\\ ",$b.=("/")[$_&1]||"__\\"for 0..$i;print$t 

I think this is alright for my first golf, I used Vynce's section for the first line, with the rest of my code to get past the new line problem with 1 triangle.

Now to see if I can shorten it :)

Edit: Whitespace

1: /\ /__\ 4: ________ /\ /\ / /__\/__\/ 

perl 109 108 106

$i=<>;$t=join$/,$i-1?" "."_"x($i/2)x4:(),$m.=(" /")[$_&1]||"\\ ",$b.=("/")[$_&1]||"__\\"for 0..$i;print$t 

I think this is alright for my first golf, I used Vynce's section for the first line, with the rest of my code to get past the new line problem with 1 triangle.

Now to see if I can shorten it :)

Edit: Whitespace

Edit 2: replaced "\n" with $/

1: /\ /__\ 4: ________ /\ /\ / /__\/__\/ 
Removed whitespace
Source Link
Caek
  • 111
  • 6
Loading
Source Link
Caek
  • 111
  • 6
Loading