Docstoc

1

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


				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:18
posted:11/6/2008
language:English
pages:1