title: Simpler way of sorting three numbers
body: <p>Is there a simpler and better way to solve this problem because </p>
  
  <ol>
  <li>I used too many variables. </li>
  <li>I used so many <code>if else</code> statements </li>
  <li>I did this using the brute force method</li>
  </ol>
  
  <blockquote>
    <p>Write a program that receives three integers as input and outputs the numbers in increasing order.<br>
    Do not use loop / array.</p>
  </blockquote>
  
  <pre><code>#include &lt;stdio.h&gt;
  main(){
     int no1;
     int no2;
     int no3;
     int sto;
     int hi;
     int lo;
  
     printf("Enter No. 1: ");
     scanf("%d", &amp;no1);
     printf("Enter No. 2: ");
     scanf("%d", &amp;no2);         
     printf("Enter No. 3: ");
     scanf("%d", &amp;no3);
  
     if (no1&gt;no2) {   
        sto=no1;    
        lo=no2;   
     } else {
        sto=no2;  
        lo=no1;  
     } 
     if (sto&gt;no3) { 
        hi=sto;    
        if(lo&gt;no3){         
           sto=lo;                
           lo=no3;
        }else {
           sto=no3;      
        }         
     }else hi=no3; 
  
     printf("LOWEST %d\n", lo);
     printf("MIDDLE %d\n", sto);
     printf("HIGHEST %d\n", hi);  
  
     getch(); 
  }    
  </code></pre>