; pr1
Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out
Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

pr1

VIEWS: 11 PAGES: 1

  • pg 1
									#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(); }


								
To top