title: Comparing Three Floats in a C Function
body: <p>I wrote this in C, to try and get a max value for get_extreme, but it's not returning a result in the compiler. </p>
  
  <p>It's supposed to return the maximum float value, or if the maximum is all three, return that result.</p>
  
  <pre><code>int get_extreme(float num1, float num2, float num3) {
  
  /* local variable declaration */
  int result;
  
  if (num1 == num2 &amp;&amp; num2 == num3 ){
      result = num1;
  }
  else if (num1 &gt; num2 &amp;&amp; num2 &gt; num3){
      result = num1;}
  else if (num2 &gt; num3 &amp;&amp; num3 &gt; num1){
      result = num2;}
  else {
      result = num3;}
  
  return result;
  }
  </code></pre>