Skip to main content
added 47 characters in body
Source Link
Graham
  • 6.8k
  • 1
  • 15
  • 11

#APL+WIN, 58 bytes

m←2 2⊤'_/~'⍳s←,⎕⋄(1+⍴s)=+/((↑m[0;]),m[1;])=m[0;],¯1↑m[1;]

Prompts for input of string, index origin 0 and uses ~ for upper character

Try it online! Courtesy of Dyalog Classic

#APL+WIN, 58 bytes

m←2 2⊤'_/~'⍳s←,⎕⋄(1+⍴s)=+/((↑m[0;]),m[1;])=m[0;],¯1↑m[1;]

Prompts for input of string

Try it online! Courtesy of Dyalog Classic

#APL+WIN, 58 bytes

m←2 2⊤'_/~'⍳s←,⎕⋄(1+⍴s)=+/((↑m[0;]),m[1;])=m[0;],¯1↑m[1;]

Prompts for input of string, index origin 0 and uses ~ for upper character

Try it online! Courtesy of Dyalog Classic

Source Link
Graham
  • 6.8k
  • 1
  • 15
  • 11

#APL+WIN, 58 bytes

m←2 2⊤'_/~'⍳s←,⎕⋄(1+⍴s)=+/((↑m[0;]),m[1;])=m[0;],¯1↑m[1;]

Prompts for input of string

Try it online! Courtesy of Dyalog Classic