F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

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;}
                                                                                                                                                                                                                                                         ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-17 21:30:52, Gzip enabled