title: C function to print maximum and minimum numbers
body: <p>'m currently writing a C program that prompts a user to enter five numbers and to display the maximum number. So here's what i came up with</p>
  
  <pre><code>int max_num(float num_arr[])
  // this is a number array        
  {
      int max = 0;
      for (int k = 0; k &lt;= 4; k++)
      {
          max = num_arr[0];
          if (max &gt; num_arr[k])
          { 
              max = num_arr[k];
              printf("The maximum number is is %d\n", max);
          }    
      }
  }
  </code></pre>
  
  <p>Any help is appreciated.</p>