title: Ascending order with three integers for C++
body: <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      int a;
      int b;
      int c;
  
      cout &lt;&lt; "Please input three integers:" &lt;&lt; endl;
      cout &lt;&lt; "&gt;&gt; ";
      cin &gt;&gt; a &gt;&gt; b &gt;&gt; c;
      cout &lt;&lt; endl;
  
      if (((a == a) &amp;&amp; (b &gt; a)) &amp;&amp; (c &gt;= a))
      {
          cout &lt;&lt; "Input three integer numbers in ascending order:" &lt;&lt; endl;
          cout &lt;&lt; a &lt;&lt; " " &lt;&lt; c &lt;&lt; " " &lt;&lt; b;
      }
      else if (((a == a) &amp;&amp; (b &gt;= a)) &amp;&amp; (c &gt;= a))
      {
          cout &lt;&lt; "Input three integer numbers in ascending order:" &lt;&lt; endl;
          cout &lt;&lt; a &lt;&lt; " " &lt;&lt; b &lt;&lt; " " &lt;&lt; c;
      }
      else if (((a &gt; b) &amp;&amp; (b == b)) &amp;&amp; (c &gt;= b))
      {
          cout &lt;&lt; "Input three integer numbers in ascending order:" &lt;&lt; endl;
          cout &lt;&lt; b &lt;&lt; " " &lt;&lt; c &lt;&lt; " " &lt;&lt; a;
      }
      else if (((a &gt;= b) &amp;&amp; (b == b)) &amp;&amp; (c &lt; b))
      {
          cout &lt;&lt; "Input three integer numbers in ascending order:" &lt;&lt; endl;
          cout &lt;&lt; c &lt;&lt; " " &lt;&lt; a &lt;&lt; " " &lt;&lt; b;
      }
      else if (((a &gt; c) &amp;&amp; (b &gt;= c)) &amp;&amp; (c == c))
      {
          cout &lt;&lt; "Input three integer numbers in ascending order:" &lt;&lt; endl;
          cout &lt;&lt; c &lt;&lt; " " &lt;&lt; b &lt;&lt; " " &lt;&lt; a;
      }
      else if (((a &gt;= c) &amp;&amp; (b &lt;= c)) &amp;&amp; (c == c))
      {
          cout &lt;&lt; "Input three integer numbers in ascending order:" &lt;&lt; endl;
          cout &lt;&lt; b &lt;&lt; " " &lt;&lt; c &lt;&lt; " " &lt;&lt; a;
      }
  
      return 0;
  }
  </code></pre>
  
  <p>For this assignment, I used 1, 2, and 3 for entering the integer. 
  My question is why these input (1, 2, 3) and (2, 1, 3) and (3, 2, 1)
  don't ascended properl?   </p>