title: Making one line string
body: <p>I need help I have task in c# to make program that take user input (string).You are given the noises made by different animals that you can hear in the dark, evaluate each noise to determine which animal it belongs to. Lions say 'Grr', Tigers say 'Rawr', Snakes say 'Ssss', and Birds say 'Chirp'.</p>
  <p>Input Format:
  A string that represent the noises that you hear with a space between them.</p>
  <p>Output Format:
  A string that includes each animal that you hear with a space after each one. (animals can repeat)</p>
  <p>I make this</p>
  <pre class="lang-java prettyprint-override"><code>    using System;
      using System.Reflection.Metadata;
      using System.Runtime.CompilerServices;
      using System.Security.Cryptography.X509Certificates;
      using System.Text;
      using System.Text.RegularExpressions;
      
      namespace nekaVjezba
      {
          class Program
          {
              static void Main(string[] args)
              {
      
      
                  var text = Console.ReadLine();
      
                  var matches = Regex.Matches(text, @&quot;\w+[^\s]*\w+|\w&quot;);
                 
      
      
                  foreach (Match match in matches)
                  {
                      var word = match.Value;
      
      
                       if (word == &quot;Grr&quot;)
                            {
                          Console.WriteLine(&quot;Lion&quot;);
      
      
                      }
                            else if (word == &quot;Rawr&quot;)
                            {
                          Console.WriteLine(&quot;Tiger&quot;);
      
                      }
                            else if (word == &quot;Ssss&quot;)
                            {
                                Console.WriteLine(&quot;Snake&quot;);
                            }
                            else if (word == &quot;Chirp&quot;)
                            {
                                Console.WriteLine(&quot;Bird&quot;);
                            }
                  }
              }
          }
      }
  </code></pre>
  <p>That is work but my output is</p>
  <ul>
  <li>Lion</li>
  <li>Lion</li>
  <li>Tiger</li>
  <li>Snake</li>
  </ul>
  <p>but it should be in one line
  <strong>Lion Lion Tiger Snake</strong></p>