title: how can I make a output of even and odd numbers
body: <pre><code>List&lt;int&gt; number= new List&lt;int&gt; { 0, 5, 6, 9, 14, 21, 45, 76, 123, 172, 212, 313 };
  </code></pre>
  <p>output:
  even numbers: 0, 6, 14, 76, 172, 212
  odd numbers: 5, 9, 21, 123, 313</p>
  <p>like this with a foreach and an if / else</p>
  <p>What I tried:</p>
  <pre><code> static void Main(string[] args)
          {
              List&lt;int&gt; number= new List&lt;int&gt; { 0, 5, 6, 9, 14, 21, 45, 76, 123, 172, 212, 313 };
              foreach (int numbers in number)
              {
  
                  if (numbers % 2 == 0)
                  {
                      Console.WriteLine(numbers);
                  }
                  else
                  {
                      Console.WriteLine(numbers);
                  }
  
              }
              Console.WriteLine(&quot;even number:&quot;numbers);
              Console.WriteLine(&quot;odd number:&quot;+numbers);
              Console.ReadLine();
          }
  </code></pre>