title: Getting the min, max, and ave of the five numbers inputted
body: <p>I'm trying to work on a program in C that gets 5 input numbers and then <strong>store these in an array.</strong> After getting the the 5 numbers, <strong>I must be getting the min, max and the average of the MINIMUN AND MAXIMUM numbers inputted and not all of the five.</strong> So here's the code that I made. When I get the maximum number, it seems to be working fine. But when it come's to the min, it's still same as the maximum and so I'll be getting a different average.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  
  int main()
  {
  int num[5];
  int counter, min, max=0;
  float average, total;
  min=num;
  
  for(counter=1; counter&lt;=5; counter++)
  {
      printf("Enter a number: ");
      scanf("%d", &amp;num[5]);
  
      if(num[5]&gt;max)
      {
          max = num[5];
      }
  
      if (num[5]&lt;min)
      {
          min = num[5];
      }
  }
  
  total = min + max;
  average = total/2;
  
  printf("The maximum number is: %d\n", max);
  printf("The minimum number is: %d\n", min); 
  printf("The average is: %d", average);
  
  
  getch();
  return 0;
  }
  </code></pre>