View Code of Problem 612

#include<bits/stdc++.h>
using namespace std;
int main() {
	int a[6];
	while(cin>>a[0])
	{
		for(int i=1;i<6;i++)
		{
		cin>>a[i];
		}
		
		sort(a,a+6);
		double h=(a[1]+a[2]+a[3]+a[4])/4.0;
		printf("%g\n",h);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 612