title: Minmax numbers array
body: <p>This program gets 5 numbers only from the user then
  Store them in an array. Get the min, max, and the average of the numbers inputted. Here's the code I made:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  
  int main()
  {
  int num[5];
  int min, max=0;
  int counter;
  float average, total;
  
  max = num[0];
  min = num[2];
  
  for(counter=0; counter&lt;=4; counter++)
  {
      printf("Enter a number: ");
      scanf("%d", &amp;num[counter]);
  
      if(num[counter]&gt;max)
      {
          max = num[counter];
      }
  
      if (num[counter]&lt;min)
      {
          min = num[counter];
      }
  }
  
  total = max+min;
  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>
  
  <p>FInally fixed my error with the min and max and now I'm having trouble with the average. I should only get the average of the min and max numbers but it keeps on showing an average of zero. Can someone help? Thankkyouuu.</p>