/* sortDemo.c  */


#include <stdio.h>


int positionOfLargest(int a[], int size)
{

  int position = 0;

  int i;

  for (i=1; i<size; i++)
    {
      if (a[i] > a[position])
	position = i;

    }
  
  return position;

}

int main(void)
{

  int someNums[] = { 6, 9, 2, 17, 13, 8, 16};

  int size = 7;

  int wheresTheLargest;

  wheresTheLargest = positionOfLargest(someNums, size);

  printf("the largest number %d is in position %d\n",
	 someNums[wheresTheLargest] , wheresTheLargest );


  printf("Next time (Wednesday) we will proceed to sort!\n");
  
  return 0;

}


