criyle/codenet-compile-errors huggingface dataset:
Language: C

#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main(void) {
	int i,j;
	int count;
	char p[100１];
	while (1) {
		j = 0;
		count = 0;
		fgets(p, sizeof(p), stdin);
		while (p[j++] != '\0') {
			count++;	//何故かカウントが一回多くされる。なんも入力しなくても(=p[0]='\0')でもcountが１される
		}
			
		for (i = 0; i<count-1; i++) {
			if (!isalpha(p[i])) {
				printf("アルファベットの大文字で入力してください\n");
				fflush(stdin);
				break;
			}
		}
		if (i == count - 1) break;
	}
	for(i=0;i<count-1;i++){
		switch(p[i]){
			case 'A':p[i]='X'; break;
			case 'B':p[i]='Y'; break;
			case 'C':p[i]='Z'; break;
			default:p[i]=p[i]-3; break;
		}
	}
	printf("%s",p);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:16: error: invalid suffix "１" on integer constant
    8 |         char p[100１];
      |                ^~~~~
Language: C

include<stdio.h>
int main(){
  char a;
  while(scanf("%c",&a) != EOF){
    switch(a){
    case 'A': printf('X');break;
    case 'B': printf('Y');break;
    case 'C': printf('Z');break;
    default:printf("%c",a-3);break;
    }
  }

  printf("\n");

  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include<stdio.h>
int main(){
  char a;
  while(scanf("%c",&a) != EOF){
    switch(a){
    case 'A': printf('X');break;
    case 'B': printf('Y');break;
    case 'C': printf('Z');break;
    default:printf("%c",(char)((int)a - 3));break;
    }
  }

  printf("\n");

  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include<stdio.h>
int main(){
  char a;
  while(scanf("%c",&a) != EOF){
    switch(a){
    case 'A': printf("X");break;
    case 'B': printf("Y");break;
    case 'C': printf("Z");break;
    default:printf("%c",(char)((int)a - 3));break;
    }
  }
  printf("\n");
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include<stdio.h>
int main(){
  char a;
  while(scanf("%c",&a) != EOF){
    switch(a){
    case 'A': printf("X");break;
    case 'B': printf("Y");break;
    case 'C': printf("Z");break;
    default:printf("%c",a - 3);break;
    }
  }
  printf("\n");
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include<stdio.h>
int main(){
  char a;
  while(scanf("%c",&a) != EOF){
    switch(a){
    case 'A': printf('X');break;
    case 'B': printf('Y');break;
    case 'C': printf('Z');break;
    default : printf("%c",a - 3);break;
    }
  }
  printf("\n");
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include<stdio.h>
int main(){
  char a;
  while(scanf("%c",&a) != EOF){
    switch(a){
    case 'A': printf("X");break;
    case 'B': printf("Y");break;
    case 'C': printf("Z");break;
    default : printf("%c",a - 3);break;
    }
  }
  printf("\n");
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include <stdio.h>
int main(void){
  char a;
  while(scanf("%c",&a) != EOF){
    switch(a){
    case 'A': printf("X");break;
    case 'B': printf("Y");break;
    case 'C': printf("Z");break;
    default : printf("%c",a - 3);break;
    }
  }
  printf("\n");
  return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C

#include <stdio.h>

int main(void){
  char a;
  while(scanf("%c",&a) != EOF){
    switch(a){
    case 'A': printf("X");break;
    case 'B': printf("Y");break;
    case 'C': printf("Z");break;
    default : printf("%c",(char)(int(a) - 3);break;
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:38: error: expected ')' before 'a'
   10 |     default : printf("%c",(char)(int(a) - 3);break;
      |                                      ^
      |                                      )
main.c:10:40: error: expected ')' before '-' token
   10 |     default : printf("%c",(char)(int(a) - 3);break;
      |                                 ~      ^~
      |                                        )
main.c:10:45: error: expected ')' before ';' token
   10 |     default : printf("%c",(char)(int(a) - 3);break;
      |                     ~                       ^
      |                                             )
main.c:10:52: error: expected ';' before '}' token
   10 |     default : printf("%c",(char)(int(a) - 3);break;
      |                                                    ^
      |                                                    ;
   11 |     }
      |     ~
Language: C

main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);}
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'c' defaults to 'int' [-Wimplicit-int]
main.c:1:13: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);}
      |             ^~~~
main.c:1:24: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration]
    1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);}
      |                        ^~~~~~~
main.c:1:1: note: 'getchar' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
  +++ |+#include <stdio.h>
    1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);}
main.c:1:37: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration]
    1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);}
      |                                     ^~~~~~~
main.c:1:37: note: include '<stdio.h>' or provide a declaration of 'putchar'
main.c:1:65: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);}
      |                                                                 ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);}
main.c:1:65: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    1 | main(c){for(gets(&c);c=getchar(),~c;putchar(c>10?65+c%68%42:c));exit(0);}
      |                                                                 ^~~~
main.c:1:65: note: include '<stdlib.h>' or provide a declaration of 'exit'
Language: C

main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));}
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));}
      |               ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));}
main.c:1:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));}
      |               ^~~~~
main.c:1:15: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:27: error: 'c' undeclared (first use in this function)
    1 | main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));}
      |                           ^
main.c:1:27: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:30: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(a){for(;~scanf("%d",&c);printf("%c",(c-62)%26+65));}
      |                              ^~~~~~
main.c:1:30: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:30: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:30: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);}
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'c' defaults to 'int' [-Wimplicit-int]
main.c:1:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);}
      |               ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);}
main.c:1:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);}
      |               ^~~~~
main.c:1:15: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:30: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);}
      |                              ^~~~~~
main.c:1:30: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:30: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:30: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:58: error: expected ')' before ';' token
    1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);}
      |            ~                                             ^
      |                                                          )
main.c:1:59: error: expected expression before '}' token
    1 | main(c){for(;~scanf("%c",&c);printf("%c",c+3-(c>90)?26:0);}
      |                                                           ^
Language: C

#include<stdio.h>
#include<string.h>

int main(){   
	char a[27]="ABCDEFGHIJKLMNOPQRSTUVWXYZ",b[1000],bstr,c,check,d;
	
	scanf("%1001[^\n]",b);
	bstr=strlen(b);
	for(c=0;c<bstr;c++){
		for(d=0;d<27;d++){
			f(b[c]==a[d]){	
				b[c]=a[d-3];	
			}
		}
	}	
	printf("%s\n",b);
	return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:11:25: error: implicit declaration of function 'f' [-Wimplicit-function-declaration]
   11 |                         f(b[c]==a[d]){
      |                         ^
main.c:11:38: error: expected ';' before '{' token
   11 |                         f(b[c]==a[d]){
      |                                      ^
      |                                      ;
Language: C

#include<iostream>
#include<string>
using namespace std;
int main(){
  string s;
  while(cin>>s){
    for(int i = 0; i < s.size(); i++){
      s[i] -= 3;
      if(s[i]<'A' || s[i]>'Z')s[i] += 26;
    }
    cout<<s<<endl;
  }
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
  int main(){
   char x[1000];
      int i=0;
     while(scanf("%s",&x) != EOF){
        x[i] -= 3;
          printf("%c",x[i];
           i++;
             }
printf("\n");
return 0;
}
       

Compiler output:
main.c: In function 'main':
main.c:7:27: error: expected ')' before ';' token
    7 |           printf("%c",x[i];
      |                 ~         ^
      |                           )
main.c:8:16: error: expected ';' before '}' token
    8 |            i++;
      |                ^
      |                ;
    9 |              }
      |              ~
Language: C

#include <stdio.h>
  int main(){
   char x[1001;
      int i=0;
	  while(x[i] != EOF){
    scanf("%c",&x[i]);
	if(x[i]=='A'){
		x[i]='X';
	}
	else if(x[i]=='B'){
		x[i]='Y';
	}
	else if(x[i]=='C'){
		x[i]='Z';
	}
     else{
		 x[i] -= 3;
	 }
          printf("%c",x[i]);
		  i++;
	}
return 0;
}
       

Compiler output:
main.c: In function 'main':
main.c:3:15: error: expected ']' before ';' token
    3 |    char x[1001;
      |               ^
      |               ]
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

#include <stdio.h>
  int main(){
   char x[1002];
      int i=0;
	  while(scanf("%c",&x[i]) != EOF){
	if(x[i]=='A'){
		x[i]=X;
	}
	else if(x[i]=='B'){
		x[i]=Y;
	}
	else if(x[i]=='C'){
		x[i]=Z;
	}
     else{
		 x[i] -= 3;
	 }
          printf("%c",x[i]);
		  i++;
	}
	  printf("\n");
return 0;
}
       

Compiler output:
main.c: In function 'main':
main.c:7:22: error: 'X' undeclared (first use in this function)
    7 |                 x[i]=X;
      |                      ^
main.c:7:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:22: error: 'Y' undeclared (first use in this function)
   10 |                 x[i]=Y;
      |                      ^
main.c:13:22: error: 'Z' undeclared (first use in this function)
   13 |                 x[i]=Z;
      |                      ^
Language: C

#include<stdio.h>

int main(){
  char c;
  while(1){
    getchar(c);
    if(c == '\n')return 0;
    int x = c - 'A';
    x = (x - 3) % 26;
    putchar(c + x);
  }
}

Compiler output:
main.c: In function 'main':
main.c:6:5: error: too many arguments to function 'getchar'
    6 |     getchar(c);
      |     ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:582:12: note: declared here
  582 | extern int getchar (void);
      |            ^~~~~~~
Language: C

#include<stdio.h>
int main()
{
  int x[26]={'X','Y','Z','A','B','C','D','E','F','G','H','I','J','K',
  'L','M','N','O','P','Q','R','S','T','U','V','W');
  char input[1001];
  int i;
  scanf("%s",input);
  char c=input[0];
  for(i=0; (c!='\0'); i++){
  printf("%c", x[(c-65)];
  c = x[i+1];
  }
putchar('\n');     
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:50: error: expected '}' before ')' token
    5 |   'L','M','N','O','P','Q','R','S','T','U','V','W');
      |                                                  ^
main.c:4:13: note: to match this '{'
    4 |   int x[26]={'X','Y','Z','A','B','C','D','E','F','G','H','I','J','K',
      |             ^
main.c:5:50: error: expected ',' or ';' before ')' token
    5 |   'L','M','N','O','P','Q','R','S','T','U','V','W');
      |                                                  ^
main.c:11:25: error: expected ')' before ';' token
   11 |   printf("%c", x[(c-65)];
      |         ~               ^
      |                         )
main.c:12:14: error: expected ';' before '}' token
   12 |   c = x[i+1];
      |              ^
      |              ;
   13 |   }
      |   ~
Language: C

#include <stdio.h>

int main(void){
	char str[1001];
	int i=0;
	scanf("%s",str);
	while(str[i]!='\0'){
		str[i]-=3;
		if(str[i]<'A'){
			c+=26;
		}
	}
	printf("%s",str);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:25: error: 'c' undeclared (first use in this function)
   10 |                         c+=26;
      |                         ^
main.c:10:25: note: each undeclared identifier is reported only once for each function it appears in
Language: C

c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23)
return 0;}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23)
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
    1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23)
      |   ^~~~
main.c: In function 'main':
main.c:1:3: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:1:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23)
      |                 ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23)
main.c:1:17: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23)
      |                 ^~~~~
main.c:1:17: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:36: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23)
      |                                    ^~~~~~
main.c:1:36: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:36: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:36: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:64: error: expected ';' before 'return'
    1 | c;main(i){for(;~scanf("%d",&c);i++)printf("%c",(c>67)?c-3:c+23)
      |                                                                ^
      |                                                                ;
    2 | return 0;}
      | ~~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main () {
    string s;
    cin >>  s;
    for(i=0;i<s.length();i++){
        s[i] = s[i]-3;
    }
    cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     for(i=0;i<s.length();i++){
      |         ^
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main () {
    int i;
    string s;
    cin >>  s;
    for(i=0;i<s.length();i++){
        if(s[i]==A) s[i] = X;
        else if (s[i]==B) s[i] = Y;
        else if (s[i]==C) s[i] = Z;
        else                  s[i] = s[i]-3;
    }
    cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: 'A' was not declared in this scope
   10 |         if(s[i]==A) s[i] = X;
      |                  ^
a.cc:10:28: error: 'X' was not declared in this scope
   10 |         if(s[i]==A) s[i] = X;
      |                            ^
a.cc:11:24: error: 'B' was not declared in this scope
   11 |         else if (s[i]==B) s[i] = Y;
      |                        ^
a.cc:11:34: error: 'Y' was not declared in this scope
   11 |         else if (s[i]==B) s[i] = Y;
      |                                  ^
a.cc:12:24: error: 'C' was not declared in this scope
   12 |         else if (s[i]==C) s[i] = Z;
      |                        ^
a.cc:12:34: error: 'Z' was not declared in this scope
   12 |         else if (s[i]==C) s[i] = Z;
      |                                  ^
Language: C++

#include <cstring>
using namespace std;

int main(){
	char str[1000];
	char a[] = {'A', 'B', 'C', 'D',
				'E', 'F', 'G', 'H', 
				'I', 'J', 'K', 'L',
				'M', 'N', 'O', 'P', 
				'Q', 'R', 'S', 'T', 
				'U', 'V', 'W', 'X', 
				'Y', 'Z'};
	cin >> str;
	int len = strlen(str);
	for(int i = 0; i < len; i++){
		for(int j = 0; j < 26; j++){
			if(str[i] == a[j]){
				str[i] = a[j-3];
				break;
			}
		}
	}
	
	cout << str << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'cin' was not declared in this scope
   13 |         cin >> str;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cstring>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout << str << endl;
      |         ^~~~
a.cc:24:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:24: error: 'endl' was not declared in this scope
   24 |         cout << str << endl;
      |                        ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <cstring>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include<stdio.h>
#include<hamakou.h>
main(){
  int now,k,i=0,n;
  char c[1024];
  n=getstring("文字列: ",c);
  k=getint("キー　: ");
  while(i<n){
    now=k;//ｋを操作するためのコピー
    if(k<0){
      now-=('~'-c[i]);//余りを足したときはみ出さないように範囲の最大まで移動した場合のキーの調整
      c[i]+=('~'-c[i]);//余りを足したときはみ出さないように範囲の最大まで移動
      now=now%('~'-' '+1);//余りを出して周回をすませる
      c[i]+=now;//最終移動
    }
    else{
      now+=(c[i]-' ');//余りを足したときはみ出さないように範囲の最小まで移動した場合のキーの調整
      c[i]-=(c[i]-' ');//余りを足したときはみ出さないように範囲の最小まで移動
      now=now%('~'-' '+1);//余りを出して周回をすませる
      c[i]+=now;//最終移動
    }
    i++;
  }
  printf("%s\n",c);
  return 0;
}

Compiler output:
a.cc:2:9: fatal error: hamakou.h: No such file or directory
    2 | #include<hamakou.h>
      |         ^~~~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
#include<hamakou.h>
main(){
  int now,k,i=0,n;
  char c[1024];
  n=getstring("文字列: ",c);
  k=getint("キー　: ");
  while(i<n){
    now=k;//ｋを操作するためのコピー
    if(k<0){
      now-=('~'-c[i]);//余りを足したときはみ出さないように範囲の最大まで移動した場合のキーの調整
      c[i]+=('~'-c[i]);//余りを足したときはみ出さないように範囲の最大まで移動
      now=now%('~'-' '+1);//余りを出して周回をすませる
      c[i]+=now;//最終移動
    }
    else{
      now+=(c[i]-' ');//余りを足したときはみ出さないように範囲の最小まで移動した場合のキーの調整
      c[i]-=(c[i]-' ');//余りを足したときはみ出さないように範囲の最小まで移動
      now=now%('~'-' '+1);//余りを出して周回をすませる
      c[i]+=now;//最終移動
    }
    i++;
  }
  cout<<c<<endl;
  return 0;
}

Compiler output:
a.cc:2:9: fatal error: hamakou.h: No such file or directory
    2 | #include<hamakou.h>
      |         ^~~~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>

int main(){
char ch,ST;
char N[27]={};

while(scanf("%c",&ch)!=EOF){
if(ch=='A')printf("D",ch);
else if(ch=='A')printf("D",ch);
else if(ch=='B')printf("E",ch);
else if(ch=='C')printf("F",ch);
else if(ch=='D')printf("G",ch);
else if(ch=='E')printf("H",ch);
else if(ch=='F')printf("I",ch);
else if(ch=='G')printf("J",ch);
else if(ch=='H')printf("K",ch);
else if(ch=='I')printf("L",ch);
else if(ch=='J')printf("M",ch);
else if(ch=='K')printf("N",ch);
else if(ch=='L')printf("O",ch);
else if(ch=='M')printf("P",ch);
else if(ch=='N')printf("Q",ch);
else if(ch=='O')printf("R",ch);
else if(ch=='P')printf("S",ch);
else if(ch=='Q')printf("T",ch);
else if(ch=='R')printf("U",ch);
else if(ch=='S')printf("V",ch);
else if(ch=='T')printf("W",ch);
else if(ch=='U')printf("X",ch);
else if(ch=='V')printf("Y",ch);
else if(ch=='W')printf("Z",ch);
else if(ch=='X')printf("A",ch);
else if(ch=='Y')printf("B",ch);
else if(ch=='Z')printf("C",ch);



}
printf("\n");
return0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:1: error: 'return0' was not declared in this scope
   40 | return0;
      | ^~~~~~~
Language: C++

#include<stdio.h>

int main(){
char ch;

while(scanf("%c",&ch)!=EOF){
if(ch>='D')ch-=3;
else ch+=23;
printf("%c",c);
}printf("\n");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'c' was not declared in this scope; did you mean 'ch'?
    9 | printf("%c",c);
      |             ^
      |             ch
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main()
{
	char alphabet[30] ="XYZABCDEFGHIJKLMNOPQRSTUVWXYZ";

	char input[1000] = { "" };
	char output[1000] = { "" };

	scanf_s("%s",&input[0],1000);

	for (int a = 0; a < 1000; a++)
	{
		for (int b = 3; b < 30; b++)
		{
			if (input[a] == alphabet[b])
			{
				output[a] = alphabet[b-3];
				break;
			}
		}
	}

	cout << output << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   13 |         scanf_s("%s",&input[0],1000);
      |         ^~~~~~~
      |         scanf
Language: C++

char ans(char t){
	if(t == 'G'){return 'D';}
if(t == 'H'){return 'E';}
if(t == 'I'){return 'F';}
if(t == 'J'){return 'G';}
if(t == 'K'){return 'H';}
if(t == 'L'){return 'I';}
if(t == 'N'){return 'J';}
if(t == 'M'){return 'K';}
if(t == 'O'){return 'L';}
if(t == 'P'){return 'M';}
if(t == 'Q'){return 'N';}
if(t == 'R'){return 'O';}
if(t == 'S'){return 'P';}
if(t == 'T'){return 'Q';}
if(t == 'U'){return 'R';}
if(t == 'V'){return 'S';}
if(t == 'W'){return 'T';}
if(t == 'X'){return 'U';}
if(t == 'Y'){return 'V';}
if(t == 'Z'){return 'W';}
if(t == 'A'){return 'X';}
if(t == 'B'){return 'Y';}
if(t == 'C'){return 'Z';}
if(t == 'D'){return 'A';}
if(t == 'E'){return 'B';}
if(t == 'F'){return 'C';}
	}
 
int main() {
	char a[1000];
	int i = 0;
	while(cin >> a[i]){i++;}
	for(int j = 0;j<i;j++){
		cout<<ans(a[j]);
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:15: error: 'cin' was not declared in this scope
   33 |         while(cin >> a[i]){i++;}
      |               ^~~
a.cc:35:17: error: 'cout' was not declared in this scope
   35 |                 cout<<ans(a[j]);
      |                 ^~~~
a.cc:37:9: error: 'cout' was not declared in this scope
   37 |         cout<<endl;
      |         ^~~~
a.cc:37:15: error: 'endl' was not declared in this scope
   37 |         cout<<endl;
      |               ^~~~
a.cc: In function 'char ans(char)':
a.cc:28:9: warning: control reaches end of non-void function [-Wreturn-type]
   28 |         }
      |         ^
Language: C++

#include <cstdio.h>
#include <vector>
using namespace std;


int main(void)
{
	char str[1024];
	
	scanf("%s", str);
	int i = 0;
	while (str[i] != '\0'){
		if (str[i] >= 88){
			str[i] -= 23;
		}
		else {
		str[i] -= 3;
		}
		i++;
		
	}
	
	printf("%s\n", str);
	
	return (0);
}

Compiler output:
a.cc:1:10: fatal error: cstdio.h: No such file or directory
    1 | #include <cstdio.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <cstdio.h>
using namespace std;


int main(void)
{
	char str[1024];
	
	scanf("%s", str);
	int i = 0;
	while (str[i] != '\0'){
		if (str[i] >= 88){
			str[i] -= 23;
		}
		else {
		str[i] -= 3;
		}
		i++;
		
	}
	
	printf("%s\n", str);
	
	return (0);
}

Compiler output:
a.cc:1:10: fatal error: cstdio.h: No such file or directory
    1 | #include <cstdio.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;
int main()
{

	int a[1000];
	char b[1000];

	cin >> b;

	for (int i = 0; b[i] != "\0"; i++) {
		a[i] = b[i];
		if (b[i] != "A" && b[i] != "B" && b[i] != "C") a[i] -= 3;
		else a[i] += 23;
		b[i] = a[i];
	}

	for (int i = 0; i < 26; i++){
		cout << b[i];
	}

	cout << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         for (int i = 0; b[i] != "\0"; i++) {
      |                         ~~~~~^~~~~~~
a.cc:13:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |                 if (b[i] != "A" && b[i] != "B" && b[i] != "C") a[i] -= 3;
      |                     ~~~~~^~~~~~
a.cc:13:41: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |                 if (b[i] != "A" && b[i] != "B" && b[i] != "C") a[i] -= 3;
      |                                    ~~~~~^~~~~~
a.cc:13:56: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |                 if (b[i] != "A" && b[i] != "B" && b[i] != "C") a[i] -= 3;
      |                                                   ~~~~~^~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
char T[30]="XYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
main(){
string S;cin>>S;
for(int i=0;i<S.size();i++){for(int j=3;j<29;j++){if(S[i]==T[j]){cout<<T[j-3];}}}
cout<<endl;}

Compiler output:
a.cc:5:1: error: expected ',' or ';' before 'main'
    5 | main(){
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
  string a="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s;
  cin>>s;
  int q[s.size()];
  for(int i=0; i<s.size(); i++){
    for(int j=0; j<a.size(); j++){
      if(s[i]==a[j]){
	q[i]=j;
	break;
      }
    }
	if(q[i]<3)
		cout<<a[q[i]+23]
	else
    	cout<<a[q[i]-3];
  }
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:17:33: error: expected ';' before 'else'
   17 |                 cout<<a[q[i]+23]
      |                                 ^
      |                                 ;
   18 |         else
      |         ~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main()
{

	string InStr;
	char   *OutStr;

	cin >> InStr;

	OutStr = new char[ InStr.size() ];

	for( unsigned short i = 0; i < InStr.size(); i++ ) {
		
		if( InStr[i] - 3 >= 64 ) {
			OutStr[i] = InStr[i] - 3;
		}
		else {
			OutStr[i] = InStr[i] + 23;
		}

	}

	for (unsigned short i = 0; i < InStr.size(); i++) {
		printf_s( "%c", OutStr[i] );
	}

	printf_s( "\n" );

	delete []OutStr;

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:17: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
   27 |                 printf_s( "%c", OutStr[i] );
      |                 ^~~~~~~~
      |                 printf
a.cc:30:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
   30 |         printf_s( "\n" );
      |         ^~~~~~~~
      |         printf
Language: C++

int main(void){char*t,s[1001];scanf("%s",s);for(t=s;*t;t++)(*t)-=3,(*t<'A')&&((*t)+=26);puts(s);return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:1:31: error: 'scanf' was not declared in this scope
    1 | int main(void){char*t,s[1001];scanf("%s",s);for(t=s;*t;t++)(*t)-=3,(*t<'A')&&((*t)+=26);puts(s);return 0;}
      |                               ^~~~~
a.cc:1:89: error: 'puts' was not declared in this scope
    1 | int main(void){char*t,s[1001];scanf("%s",s);for(t=s;*t;t++)(*t)-=3,(*t<'A')&&((*t)+=26);puts(s);return 0;}
      |                                                                                         ^~~~
Language: C++

a = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
b = list("DEFGHIJKLMNOPQRSTUVWXYZABC")

x = list(input())
for i in range(len(x)):
    for j in range(len(a)):
        if x[i] == b[j]:
            x[i] = a[j]
            break
for i in range(len(x)):
    print(x[i], end = "")
print("")

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
      | ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;

#define LEN 1000

int main(){
	char angou[LEN];
	char buff[27] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ"};
	int i, str;
	
	cin >> angou;
	str = strlen(angou);
	for(i = 0; i < str; i ++){
		angou[i] = tolower(angou[i]);
	}
	for(i = 0; angou[i] != '\0'; i++){
		if(angou[i] - 'A' - 3 >= 0){
			 printf("%c", buff[angou[i]-'a'-3]);
		}
		else{
			printf("%c", buff[angou[i] - 'a' - 3 + 26]);
		}
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: 'strlen' was not declared in this scope
   14 |         str = strlen(angou);
      |               ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<cctype>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
#include<string>

using namespace std;

#define LEN 1000

int main(){
	char angou[LEN];
	char buff[27] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ"};
	int i, str;
	
	cin >> angou;
	str = strlen(angou);
	for(i = 0; i < str; i ++){
		angou[i] = tolower(angou[i]);
	}
	for(i = 0; angou[i] != '\0'; i++){
		if(angou[i] - 'A' - 3 >= 0){
			 printf("%c", buff[angou[i]-'a'-3]);
		}
		else{
			printf("%c", buff[angou[i] - 'a' - 3 + 26]);
		}
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: 'strlen' was not declared in this scope
   16 |         str = strlen(angou);
      |               ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<cctype>
  +++ |+#include <cstring>
    4 | #include<string>
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
int main(void){
	char a[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
	char b[1000];
	int c[1000],i,n,s,kazu,;
	cin>>b;
	for(i=0;i<1000;i++){
		c[i]=0;
	}
	kazu=strlen(b);
	n=0;
	for(i=0;i<kazu;i++){
		for(s=0;s<26;s++){
			if(b[i]==a[s]){
				if(s-3<0){
					c[n]=s+23;
					n++;
				}
				else{
					c[n]=s-3;
					n++;
				}
			}
		}
	}
	for(i=0;i<kazu;i++){
		cout<<a[c[i]];
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:32: error: expected unqualified-id before ';' token
    8 |         int c[1000],i,n,s,kazu,;
      |                                ^
Language: C++

#include <iostream>
#include <string>

int main() {
    string str, res;
    std::cin >> str;

    string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    for (int i = 0; i < (int)str.size(); ++i) {
        char s = str[i];
        for (int j = 0; j < (int)alphabet.size(); j++) {
            if (s == alphabet[j]) {
                int size = (int)alphabet.size();
                res += alphabet[(size + j - 3) % size];
                break;
            }
        }
    }
    std::cout << res;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string str, res;
      |     ^~~~~~
a.cc:5:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:17: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |     std::cin >> str;
      |                 ^~~
      |                 std
a.cc:8:11: error: expected ';' before 'alphabet'
    8 |     string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
      |           ^~~~~~~~~
      |           ;
a.cc:11:34: error: 'alphabet' was not declared in this scope
   11 |         for (int j = 0; j < (int)alphabet.size(); j++) {
      |                                  ^~~~~~~~
a.cc:14:17: error: 'res' was not declared in this scope
   14 |                 res += alphabet[(size + j - 3) % size];
      |                 ^~~
a.cc:19:18: error: 'res' was not declared in this scope
   19 |     std::cout << res;
      |                  ^~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string str;
  string res = "";
  cin >> str;

  string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

  for (int i = 0; i <(int)s.size() ++i) {
      char s  = str[i];
     for (int j = 0; i < (int)alphabet.size();
     res += alphabet[(size + j -3) % size];
  }
 }
}
cout << res << end];



}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: 's' was not declared in this scope
   11 |   for (int i = 0; i <(int)s.size() ++i) {
      |                           ^
a.cc:11:38: error: expected ';' before 'i'
   11 |   for (int i = 0; i <(int)s.size() ++i) {
      |                                      ^
      |                                      ;
a.cc:14:28: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
   14 |      res += alphabet[(size + j -3) % size];
      |                       ~~~~~^~~
a.cc:14:43: error: expected ')' before ';' token
   14 |      res += alphabet[(size + j -3) % size];
      |                                           ^
      |                                           )
a.cc:13:10: note: to match this '('
   13 |      for (int j = 0; i < (int)alphabet.size();
      |          ^
a.cc: At global scope:
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
a.cc:18:1: error: 'cout' does not name a type
   18 | cout << res << end];
      | ^~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string str;
  string res = "";
  cin >> str;

  string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

  for (int i = 0; i <(int)s.size(); ++i) {
      char s  = str[i];
     for (int j = 0; j < (int)alphabet.size();j++) {
     res += alphabet[(size + j -3) % size];
  }
 }
}
cout << res << end];



}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: 's' was not declared in this scope
   11 |   for (int i = 0; i <(int)s.size(); ++i) {
      |                           ^
a.cc:14:28: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
   14 |      res += alphabet[(size + j -3) % size];
      |                       ~~~~~^~~
a.cc: At global scope:
a.cc:18:1: error: 'cout' does not name a type
   18 | cout << res << end];
      | ^~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string str;
  string res = "";
  cin >> str;

  string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

  for (int i = 0; i <(int)str.size(); ++i) {
      char s  = str[i];
     for (int j = 0; j < (int)alphabet.size();j++) {
     res += alphabet[(size + j -3) % size];
  }
 }
}
cout << res << end];



}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
   14 |      res += alphabet[(size + j -3) % size];
      |                       ~~~~~^~~
a.cc: At global scope:
a.cc:18:1: error: 'cout' does not name a type
   18 | cout << res << end];
      | ^~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string str;
  string res = "";
  cin >> str;

  string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

  for (int i = 0; i <(int)str.size(); ++i) {
      char s  = str[i];
     for (int j = 0; j < (int)alphabet.size();j++) {
     int size = (int)alphabet.size();
     res += alphabet[(size + j -3) % size];
  }
 }
}
cout << res << end];



}

Compiler output:
a.cc:19:1: error: 'cout' does not name a type
   19 | cout << res << end];
      | ^~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

#include <stdio.h>
#include <string>
using namespace std;

string S;
unsigned int n;

int main(void){
    getline(cin,S);
    n = S.length();
    for(int i = 0; i < n; i++){
        char c = S[i];
        int n = ((c - 'A') + 3)%26;
        
        printf("%c",'A' + n);
    }
    printf("\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'cin' was not declared in this scope
    9 |     getline(cin,S);
      |             ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string>
  +++ |+#include <iostream>
    3 | using namespace std;
Language: C++

#include<stdio.h>
main(){
    char S[1024];
    scanf("%s",S);
    for(int i = 0;S[i] != '\0';i++){
        char c = S[i] - 3;
        if(c < 'A'){
            c += 26;
        }
        printf("%c",c);
    }
    printf('\n');
}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:12:12: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   12 |     printf('\n');
      |            ^~~~
      |            |
      |            char
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<queue>
#include<stack>
#include<set>
#include<functional>
#include<cmath>

using namespace std;

typedef long long ll;

int main()
{
	char str[1050];

	scanf("%s",str);

	char b;
	for (int i = 0; i < strlen(str); i++) {
		if(str[i]=='A'||str[i]=='B'||str[i]=='C'){
			b=str[i] + 23;
		}
		else b=str[i] - 3;
		printf("%c", b);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:29: error: 'strlen' was not declared in this scope
   23 |         for (int i = 0; i < strlen(str); i++) {
      |                             ^~~~~~
a.cc:11:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   10 | #include<cmath>
  +++ |+#include <cstring>
   11 |
Language: C++

#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
char a[1001];
int main()
{
	int i,lena;
	char n;
	gets(a);
	lena=strlen(a);
	for(i=0;i<lena;i++)
	{
		n=a[i]-3;
		if(n<65)n=91-(65-n);
		cout<<n;
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
char a[1001];
int main()
{
	int i,lena;
	char n;
	gets(a);
	lena=strlen(a);
	for(i=0;i<lena;i++)
	{
		n=a[i]-3;
		if(n<41)n=7B-(41-n);
		cout<<n;
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |         gets(a);
      |         ^~~~
      |         getw
a.cc:15:27: error: unable to find numeric literal operator 'operator""B'
   15 |                 if(n<41)n=7B-(41-n);
      |                           ^~
Language: C++

#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
char a[1001];
int main()
{
	int i,lena;
	char n;
	gets(a);
	lena=strlen(a);
	for(i=0;i<lena;i++)
	{
		if(a[i]<='C')
		{
			n=a[i]+23;
		}
		else n=a[i]-3;
		cout<<n;
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
char a[1001];
int main()
{
	int i,lena;
	char n;
	gets(a);
	lena=strlen(a);
	for(i=0;i<lena;i++)
	{
		if(a[i]<='C')
		a[i]+=23;
		else a[i]-=3;
		cout<<a[i];
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

#include<cstdio>
#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
char a[1001];
int main()
{
	int i,lena;
	char n;
	gets(a);
	lena=strlen(a);
	for(i=0;i<lena;i++)
	{
		if(a[i]<='C')
		a[i]+=23;
		else a[i]-=3;
		cout<<a[i];
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   11 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
	string str;
	cin>>str;
	for (i=0;i<str.size();i++)
	{
		if (str[i]<'D'){
			str[i]=str[i]+23;
		}else{
			str[i]=str[i]+3;
		}
	cout<<str<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'i' was not declared in this scope
    7 |         for (i=0;i<str.size();i++)
      |              ^
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(void){
	string str;
	cin>>str;
	for (int i=0;i<str.size();i++)
	{
		if (str[i]<'D'){
			str[i]=str[i]+23;
		}else{
			str[i]=str[i]+3;
		}
	cout<<str<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(void){
	string str;
	cin>>str;
	for (int i=0;i<str.size();i++)
	{
		if (str[i]<'D'){
			str[i]=str[i]+23;
		}else{
			str[i]=str[i]-3;
		}
	cout<<str<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(void){
	string str;
	int i;
	cin>>str;
	for (i=0;i<str.size();i++)
	{
		if (str[i]<'D'){
			str[i]=str[i]+23;
		}else{
			str[i]=str[i]-3;
		}
	cout<<str<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

#include<stdio.h>
#include<iostream>
#include<string>
using namespace std;
int main(void)
{
	int a, siz,i;
	char c,b,p[1001];
	scanf("%s", p);
	siz = strlen(p);
	for (i = 0; i <siz; i++)
	{
		a = p[i];
		if (a >= 68)
		{
			a = a - 3;
		}
		else
		{
			a = a + 23;
		}
		b = a;
		printf("%c", b);
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'strlen' was not declared in this scope
   10 |         siz = strlen(p);
      |               ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<iostream>
  +++ |+#include <cstring>
    3 | #include<string>
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	char moji[10000]={};
	int len;
	cin>>moji;
	len=strlen(moji);
	for(int i=0;i<len;i++){
		if(moji[i]-'A'<=22){
			moji[i]=moji[i]-3;
		}
		else{
			moji[i]=moji[i]+23;
		}
	}
	for(int i=0;i<len;i++){
		cout<<moji[i];
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'strlen' was not declared in this scope
    8 |         len=strlen(moji);
      |             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	char moji[1500]={};
	int len;
	cin>>moji;
	len=strlen(moji);
	for(int i=0;i<len;i++){
		if(moji[i]-'A'<=22){
			moji[i]=moji[i]-3;
		}
		else{
			moji[i]=moji[i]+23;
		}
	}
	for(int i=0;i<len;i++){
		cout<<moji[i];
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'strlen' was not declared in this scope
    8 |         len=strlen(moji);
      |             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>