Language: C

#define z 1000000
a[z],b[z],n,i=1,x,c;main(){for(;i++<z;)a[i]=i;for(i=-1;i++<z;)if(a[i]){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}for(;~scanf("%d",&n);c=0)while(b[c]<=n && b[c])c++;printf("%d\n",c);}exit(0);}

Compiler output:
main.c:2:1: warning: data definition has no type or storage class
    2 | a[z],b[z],n,i=1,x,c;main(){for(;i++<z;)a[i]=i;for(i=-1;i++<z;)if(a[i]){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}for(;~scanf("%d",&n);c=0)while(b[c]<=n && b[c])c++;printf("%d\n",c);}exit(0);}
      | ^
main.c:2:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:2:6: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
    2 | a[z],b[z],n,i=1,x,c;main(){for(;i++<z;)a[i]=i;for(i=-1;i++<z;)if(a[i]){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}for(;~scanf("%d",&n);c=0)while(b[c]<=n && b[c])c++;printf("%d\n",c);}exit(0);}
      |      ^
main.c:2:11: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
    2 | a[z],b[z],n,i=1,x,c;main(){for(;i++<z;)a[i]=i;for(i=-1;i++<z;)if(a[i]){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}for(;~scanf("%d",&n);c=0)while(b[c]<=n && b[c])c++;printf("%d\n",c);}exit(0);}
      |           ^
main.c:2:13: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
    2 | a[z],b[z],n,i=1,x,c;main(){for(;i++<z;)a[i]=i;for(i=-1;i++<z;)if(a[i]){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}for(;~scanf("%d",&n);c=0)while(b[c]<=n && b[c])c++;printf("%d\n",c);}exit(0);}
      |             ^
main.c:2:17: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
    2 | a[z],b[z],n,i=1,x,c;main(){for(;i++<z;)a[i]=i;for(i=-1;i++<z;)if(a[i]){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}for(;~scanf("%d",&n);c=0)while(b[c]<=n && b[c])c++;printf("%d\n",c);}exit(0);}
      |                 ^
main.c:2:19: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
    2 | a[z],b[z],n,i=1,x,c;main(){for(;i++<z;)a[i]=i;for(i=-1;i++<z;)if(a[i]){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}for(;~scanf("%d",&n);c=0)while(b[c]<=n && b[c])c++;printf("%d\n",c);}exit(0);}
      |                   ^
main.c:2:21: error: return type defaults to 'int' [-Wimplicit-int]
    2 | a[z],b[z],n,i=1,x,c;main(){for(;i++<z;)a[i]=i;for(i=-1;i++<z;)if(a[i]){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}for(;~scanf("%d",&n);c=0)while(b[c]<=n && b[c])c++;printf("%d\n",c);}exit(0);}
      |                     ^~~~
main.c: In function 'main':
main.c:2:112: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    2 | a[z],b[z],n,i=1,x,c;main(){for(;i++<z;)a[i]=i;for(i=-1;i++<z;)if(a[i]){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}for(;~scanf("%d",&n);c=0)while(b[c]<=n && b[c])c++;printf("%d\n",c);}exit(0);}
      |                                                                                                                ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #define z 1000000
main.c:2:112: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    2 | a[z],b[z],n,i=1,x,c;main(){for(;i++<z;)a[i]=i;for(i=-1;i++<z;)if(a[i]){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}for(;~scanf("%d",&n);c=0)while(b[c]<=n && b[c])c++;printf("%d\n",c);}exit(0);}
      |                                                                                                                ^~~~~
main.c:2:112: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:2:157: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    2 | a[z],b[z],n,i=1,x,c;main(){for(;i++<z;)a[i]=i;for(i=-1;i++<z;)if(a[i]){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}for(;~scanf("%d",&n);c=0)while(b[c]<=n && b[c])c++;printf("%d\n",c);}exit(0);}
      |                                                                                                                                                             ^~~~~~
main.c:2:157: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:2:157: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:2:157: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:2:180: error: expected declaration specifiers or '...' before numeric constant
    2 | a[z],b[z],n,i=1,x,c;main(){for(;i++<z;)a[i]=i;for(i=-1;i++<z;)if(a[i]){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}for(;~scanf("%d",&n);c=0)while(b[c]<=n && b[c])c++;printf("%d\n",c);}exit(0);}
      |                                                                                                                                                                                    ^
main.c:2:183: error: expected identifier or '(' before '}' token
    2 | a[z],b[z],n,i=1,x,c;main(){for(;i++<z;)a[i]=i;for(i=-1;i++<z;)if(a[i]){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}for(;~scanf("%d",&n);c=0)while(b[c]<=n && b[c])c++;printf("%d\n",c);}exit(0);}
      |                                                                                                                                                                                       ^