View Code of Problem 612

#include <bits/stdc++.h>
#define N 1000
using namespace std;
int main() 
{	
	int str[6];
	while(cin>>str[0])
	{
		double sum=0;
		for(int i=1;i<6;i++)
			cin>>str[i];
		sort(str,str+6);
		for(int i=1;i<5;i++)
			sum=sum+str[i];
		sum=sum/4;
		/*if((sum-(int)sum)<0.01)
			printf("%d\n",(int)sum);
		else*/
		cout<<sum<<endl;
	}
}

Double click to view unformatted code.


Back to problem 612