Docstoc

1

Document Sample
1 Powered By Docstoc
					#include <fstream.h> #include <conio.h> #include <iomanip.h> int a[100],n; void main(){ cout<<"n="; cin>>n; for(int i=1;i<=n;i++){ cout<<"nota "<<i<<"="; cin>>a[i]; } int max=a[1],min=a[1]; float s=0; for(i=1;i<=n;i++){ if(a[i]>max) max=a[i]; if(a[i]<min) min=a[i]; s+=a[i]; } s=s-max-min; cout<<"media este "<<s/(n-2)<<setprecision(2); }


				
DOCUMENT INFO
Shared By:
Tags:
Stats:
views:31
posted:11/1/2008
language:
pages:1