title: Sort Red, Green Blue using C
body: <p>this is my first time using Stack Overflow, and I must warn you that I only started to learn C earlier this week. I am trying to write a simple program that will find which color has the greatest value out of the RGB spectrum. It has a manual input for each color, but when It is finished, I am getting 2 odd numbers ranging in the millions. Could somebody help a noob? Here is the code that I've written so far:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      int mm, m;
      int hh, h;
      int r, g, b, c;
  
      printf("Enter Value For Red (0-255)\n");
      scanf("%d", &amp;r);
      printf("Enter Value For Green (0-255)\n");
      scanf("%d", &amp;g);
      printf("Enter Value For Blue (0-255)\n");
      scanf("%d", &amp;b);
  
  
      if ( r &gt; g );
          if ( r &gt; b );
              mm = r;
              if ( g &gt; b );
                  m = b;
              if ( b &gt; g );
                  m = g;
         if ( r &lt; b );
              mm = b;
              m = g;
      if ( g &gt; r );
          if ( g &gt; b );
              mm = g;
              if ( r &gt; b );
                  m = b;
              if ( b &gt; r );
                  m = r;
          if ( g &lt; b );
              mm = b;
              m = r;
  
      printf("%d\n", &amp;mm);
      printf("%d\n", &amp;m);
  }
  </code></pre>