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_15509818_32389.cpp: In function 'int main()':
0_0_15509818_32389.cpp:1:62: error: 'scanf' was not declared in this scope
 int main(void){ int x,y,i,j,k,sum,t; while(scanf("%d%d",&x,&y)!=EOF) {  sum=0;  if(x==0&&y==0) break;  for(i=x;i<=y;i++)  {   t=i*i+i+41;   k=1;   for(j=2;j*j<=t;j++)   {        if(t%j==0)    {     k=0;     break;    }   }   if(k)    sum++;  }  if(sum==y-x+1)   printf("OK\n");  else   printf("Sorry\n"); } return 0;}
                                                              ^
0_0_15509818_32389.cpp:1:65: error: 'EOF' was not declared in this scope
 int main(void){ int x,y,i,j,k,sum,t; while(scanf("%d%d",&x,&y)!=EOF) {  sum=0;  if(x==0&&y==0) break;  for(i=x;i<=y;i++)  {   t=i*i+i+41;   k=1;   for(j=2;j*j<=t;j++)   {        if(t%j==0)    {     k=0;     break;    }   }   if(k)    sum++;  }  if(sum==y-x+1)   printf("OK\n");  else   printf("Sorry\n"); } return 0;}
                                                                 ^
0_0_15509818_32389.cpp:1:276: error: 'printf' was not declared in this scope
 int main(void){ int x,y,i,j,k,sum,t; while(scanf("%d%d",&x,&y)!=EOF) {  sum=0;  if(x==0&&y==0) break;  for(i=x;i<=y;i++)  {   t=i*i+i+41;   k=1;   for(j=2;j*j<=t;j++)   {        if(t%j==0)    {     k=0;     break;    }   }   if(k)    sum++;  }  if(sum==y-x+1)   printf("OK\n");  else   printf("Sorry\n"); } return 0;}
                                                                                                                                                                                                                                                                                    ^
0_0_15509818_32389.cpp:1:303: error: 'printf' was not declared in this scope
 int main(void){ int x,y,i,j,k,sum,t; while(scanf("%d%d",&x,&y)!=EOF) {  sum=0;  if(x==0&&y==0) break;  for(i=x;i<=y;i++)  {   t=i*i+i+41;   k=1;   for(j=2;j*j<=t;j++)   {        if(t%j==0)    {     k=0;     break;    }   }   if(k)    sum++;  }  if(sum==y-x+1)   printf("OK\n");  else   printf("Sorry\n"); } 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-12-02 08:34:46, Gzip enabled