float into int


can anyone help me out with converting a float into integer. I'm new here...
1
2
3
 	cin>>a>>b>>c>>d>>e;
	f=(a+b+c+d+e)/5;
	cout<<f;

so i come here and i need to convert f from float to int (f is unknown) and compare it to rest of the numbers to see which one is the closest one.
Last edited on
thank you :)
Topic archived. No new replies allowed.