title: Need help finding the middle value of 3 values given by a user
body: <p>I'm going through a review my teacher gave the me for my first quarter final, and there is a question I don't remember the teacher going over. The question says "Get 3 values from the user, figure out and display the middle value", i.e. 10, 20, 30... 20 is the middle value. So far I have tried iterations of this code:</p>
  
  <pre><code>Console.WriteLine("Enter a value: ");
  int value10 = int.Parse(Console.ReadLine());
  Console.WriteLine("Enter another value: ");
  int value11 = int.Parse(Console.ReadLine());
  Console.WriteLine("Enter one last value: ");
  int value12 = int.Parse(Console.ReadLine());
  
  if (value10 &gt; value11 &amp;&amp; value11 &gt; value12)
      Console.WriteLine("{0} is the middle value.", value11);
  
  else if (value11 &gt; value12 &amp;&amp; value12 &gt; value10)
      Console.WriteLine("{0} is the middle value.", value12);
  
  else
      Console.WriteLine("{0} is the middle value.", value10);
  </code></pre>
  
  <p>No version I have written of this works.... WTF am I missing? I keep trying different combos of values, and directions of the lesser/greater than symbol. I've also tried different variations of <code>if</code> <code>if else</code> and <code>else</code>. Thanks in advance for any help.</p>