title: C# Console Application Program to find Small and Large values
body: <p><strong>I am new to Programming</strong> and I want to write a C# Console Application in which a <strong>user input at-least four or more numbers</strong> (e.g. 5,2,45,39...) and the <strong>Application tells the smaller and greater</strong> (i.e. 2&lt;5&lt;39&lt;45... or something like this).</p>
  
  <p>I was trying if/else conditions but this was written for 3 inputs, <strong>for more than 3 inputs the program became too long</strong> due to if/else conditions.</p>
  
  <pre><code>{
          double A, B, C;
  
          Console.WriteLine("input Three Numbers and Press Enter after each.");
          A = Convert.ToDouble(Console.ReadLine());
          B = Convert.ToDouble(Console.ReadLine());
          C = Convert.ToDouble(Console.ReadLine());
  
          if (A &lt; B &amp;&amp; B &lt; C)
              Console.WriteLine(A + " &lt; " + B + " &lt; " + C);
          else if (A &lt; C &amp;&amp; C &lt; B)
              Console.WriteLine(A + " &lt; " + C + " &lt; " + B);
          else if (B &lt; A &amp;&amp; A &lt; C)
              Console.WriteLine(B + " &lt; " + A + " &lt; " + C);
          else if (B &lt; C &amp;&amp; C &lt; A)
              Console.WriteLine(B + " &lt; " + C + " &lt; " + A);
          else if (C &lt; A &amp;&amp; A &lt; B)
              Console.WriteLine(C + " &lt; " + A + " &lt; " + B);
          else if (C &lt; B &amp;&amp; B &lt; A)
              Console.WriteLine(C + " &lt; " + B + " &lt; " + A);
      }
  </code></pre>