Ping Pong

Published by SyntaxGardener in

Insira "Pong!" após cada "Ping!", exceto após o último quando win for false. Quando win for true, termine também com "Pong!".

Exemplo

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