Problem 1)How much data are you able to write to "height.txt"?
Problem 2)After cin>>height[x] you can calculate the average height by summing the ten elements in this array and dividing by 10 using a loop..... or add the sum code and division by 10 within this loop block.e.g.
1 2 3 4 5 6 7 8
cout << "The student heights you entered are: "<< endl;
for (int x = 0; x < 10; x = x + 1)
{
cout << height[x] << endl;
sum_of_heights+=height[x];
av_stud_height=sum_of_heights/10;
cout<<av_stud_heights<<endl;
}