Language: C++

j,i,n,x=0;int main(){while(scanf("%d",&n)!=EOF){for(i=n-1;;i--){for(j=2;j*j<=i;j++){	if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d ",i); goto qq;}
x=0;}q:for(i=n+1;;i++){for(j=2;j*j<=i;j++){	if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d\n",i); goto rr;}
x=0;} r:; }return 0;}

Compiler output:
a.cc:1:1: error: 'j' does not name a type
    1 | j,i,n,x=0;int main(){while(scanf("%d",&n)!=EOF){for(i=n-1;;i--){for(j=2;j*j<=i;j++){    if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d ",i); goto qq;}
      | ^
a.cc: In function 'int main()':
a.cc:1:40: error: 'n' was not declared in this scope
    1 | j,i,n,x=0;int main(){while(scanf("%d",&n)!=EOF){for(i=n-1;;i--){for(j=2;j*j<=i;j++){    if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d ",i); goto qq;}
      |                                        ^
a.cc:1:28: error: 'scanf' was not declared in this scope
    1 | j,i,n,x=0;int main(){while(scanf("%d",&n)!=EOF){for(i=n-1;;i--){for(j=2;j*j<=i;j++){    if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d ",i); goto qq;}
      |                            ^~~~~
a.cc:1:44: error: 'EOF' was not declared in this scope
    1 | j,i,n,x=0;int main(){while(scanf("%d",&n)!=EOF){for(i=n-1;;i--){for(j=2;j*j<=i;j++){    if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d ",i); goto qq;}
      |                                            ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | j,i,n,x=0;int main(){while(scanf("%d",&n)!=EOF){for(i=n-1;;i--){for(j=2;j*j<=i;j++){    if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d ",i); goto qq;}
a.cc:1:53: error: 'i' was not declared in this scope
    1 | j,i,n,x=0;int main(){while(scanf("%d",&n)!=EOF){for(i=n-1;;i--){for(j=2;j*j<=i;j++){    if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d ",i); goto qq;}
      |                                                     ^
a.cc:1:69: error: 'j' was not declared in this scope
    1 | j,i,n,x=0;int main(){while(scanf("%d",&n)!=EOF){for(i=n-1;;i--){for(j=2;j*j<=i;j++){    if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d ",i); goto qq;}
      |                                                                     ^
a.cc:1:109: error: 'x' was not declared in this scope
    1 | j,i,n,x=0;int main(){while(scanf("%d",&n)!=EOF){for(i=n-1;;i--){for(j=2;j*j<=i;j++){    if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d ",i); goto qq;}
      |                                                                                                             ^
a.cc:1:119: error: 'x' was not declared in this scope
    1 | j,i,n,x=0;int main(){while(scanf("%d",&n)!=EOF){for(i=n-1;;i--){for(j=2;j*j<=i;j++){    if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d ",i); goto qq;}
      |                                                                                                                       ^
a.cc:1:126: error: 'printf' was not declared in this scope
    1 | j,i,n,x=0;int main(){while(scanf("%d",&n)!=EOF){for(i=n-1;;i--){for(j=2;j*j<=i;j++){    if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d ",i); goto qq;}
      |                                                                                                                              ^~~~~~
a.cc:1:126: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:2:1: error: 'x' was not declared in this scope
    2 | x=0;}q:for(i=n+1;;i++){for(j=2;j*j<=i;j++){     if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d\n",i); goto rr;}
      | ^
a.cc:2:12: error: 'i' was not declared in this scope
    2 | x=0;}q:for(i=n+1;;i++){for(j=2;j*j<=i;j++){     if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d\n",i); goto rr;}
      |            ^
a.cc:2:28: error: 'j' was not declared in this scope
    2 | x=0;}q:for(i=n+1;;i++){for(j=2;j*j<=i;j++){     if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d\n",i); goto rr;}
      |                            ^
a.cc:2:69: error: 'x' was not declared in this scope
    2 | x=0;}q:for(i=n+1;;i++){for(j=2;j*j<=i;j++){     if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d\n",i); goto rr;}
      |                                                                     ^
a.cc:2:79: error: 'x' was not declared in this scope
    2 | x=0;}q:for(i=n+1;;i++){for(j=2;j*j<=i;j++){     if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d\n",i); goto rr;}
      |                                                                               ^
a.cc:2:86: error: 'printf' was not declared in this scope
    2 | x=0;}q:for(i=n+1;;i++){for(j=2;j*j<=i;j++){     if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d\n",i); goto rr;}
      |                                                                                      ^~~~~~
a.cc:2:86: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:3:1: error: 'x' was not declared in this scope
    3 | x=0;} r:; }return 0;}
      | ^
a.cc:1:148: error: label 'qq' used but not defined
    1 | j,i,n,x=0;int main(){while(scanf("%d",&n)!=EOF){for(i=n-1;;i--){for(j=2;j*j<=i;j++){    if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d ",i); goto qq;}
      |                                                                                                                                                    ^~
a.cc:2:109: error: label 'rr' used but not defined
    2 | x=0;}q:for(i=n+1;;i++){for(j=2;j*j<=i;j++){     if(j!=i){if(i%j==0){x=1;}}}if(x==0) {printf("%d\n",i); goto rr;}
      |                                                                                                             ^~