Ping Pong

Published by SyntaxGardener in

Inserta "Pong!" después de cada "Ping!", excepto después del último cuando win es false. Cuando win es true, termina también con "Pong!".

Ejemplo

Program.PingPong(new[] { "Ping!", "Ping!" }, false) ➢ new[] { "Ping!", "Pong!", "Ping!" }