Skip to main content
3 of 5
added 32 characters in body; edited title
Taako
  • 569
  • 4
  • 9

Repeat every other character in string starting with second character

Requirements:

  • Take a single word input on stdin with only lowercase alphabetical characters (a-z)
  • Output a string where every other character is repeated, with the first repeated character being the second character in the string

Example:

Input: abcde

Output: abbcdde

Winning Criteria: Standard code golf. Shortest number of bytes in program wins.

Taako
  • 569
  • 4
  • 9