I was expecting to post something more complex as my first puzzle in PCG, but a particular, uh... homework question on Stack Overflow inspired me to post this. They want to:
print the following pattern for any given word that contains odd number of letters:
P M R A O R G O R R A P M
Notice that letters are a knight's move apart in the pattern you need to print. So, every other column is empty. -- (Thanks xnor for pointing this out.)
Rules
- Using C++ is prohibited. As I may link this question there.
- You may use
stdout
, or any means of quickly outputting a string (e.g.alert()
in JavaScript). - As always, shortest code wins.