#include <stdio.h>

void main()
{

	float height[6],total=0,average;
	int i;
	int choice;

	for (i = 0; i < 6; i++)
	{
		printf("Enter next height: ");
		scanf("%f", &height[i]);
	}

	printf("\nThe heights entered were: ");

	for (i = 0; i < 6; i++)
	{
		printf("%.2f ",height[i]);
	}

	printf("\n\nWhich array element would you like to see?");
	scanf("%d", &choice);

	printf("\nThe value at position %d is: %f",choice,height[choice]);

	for (i = 0; i < 6; i++)
	{
		total = total + height[i];
	}
	average = total / 6;
	printf("\n\nThe average height is: %.2f\n\n", average);
}