0_0_13111355_19593.cpp: In function 'int main()':
0_0_13111355_19593.cpp:1:67: error: 'scanf' was not declared in this scope
int main(){ int max,min,n,i,s,sum; double ave; while(scanf("%d",&n)!=EOF) { max=-1;min=101;sum=0; for(i=0;i<n;i++) { scanf("%d",&s); sum=sum+s; if(max<s) max=s; if(min>s) min=s; } ave=(sum-max-min)*1.0/(n-2); printf("%0.2f\n",ave); } return 0;}
^
0_0_13111355_19593.cpp:1:70: error: 'EOF' was not declared in this scope
int main(){ int max,min,n,i,s,sum; double ave; while(scanf("%d",&n)!=EOF) { max=-1;min=101;sum=0; for(i=0;i<n;i++) { scanf("%d",&s); sum=sum+s; if(max<s) max=s; if(min>s) min=s; } ave=(sum-max-min)*1.0/(n-2); printf("%0.2f\n",ave); } return 0;}
^
0_0_13111355_19593.cpp:1:249: error: 'printf' was not declared in this scope
int main(){ int max,min,n,i,s,sum; double ave; while(scanf("%d",&n)!=EOF) { max=-1;min=101;sum=0; for(i=0;i<n;i++) { scanf("%d",&s); sum=sum+s; if(max<s) max=s; if(min>s) min=s; } ave=(sum-max-min)*1.0/(n-2); printf("%0.2f\n",ave); } return 0;}
^
|