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

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

int main(int argc, const char * argv[])
{
    int i = 0, j;
    char ch;
    char ch2[];
    
    while (1) {
        scanf("%c", &ch);
        if (ch == '\n') {
            break;
        }
        ch2[i] = ch;
        i++;
    }
    for (j = 0; j < i; j++) {
        if (isupper(ch2[j])) {
            ch2[j] = tolower(ch2[j]);
        }
        else if (islower(ch2[j])) {
            ch2[j] = toupper(ch2[j]);
        }
    }
    
    for (j = 0; j < i; j++) {
        printf("%c", ch2[j]);
    }
    
    puts("");
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:10: error: array size missing in 'ch2'
    8 |     char ch2[];
      |          ^~~
Language: C

// AOJ0006
#include<stdio.h>
#include<cctype>

int main(){
	char ch;

	while(1){
		scanf("%c", &ch);

		if(islower(ch) == 1)
			printf("%c", toupper(ch));
		if(isupper(ch) == 1)
			printf("%c", tolower(ch));

		if(ch == '\n')
			break;
	}
	printf("\n");

	return 0;
}

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

main(c){for(;read(0,&c,1);putchar(c^c-31>>1);}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(c){for(;read(0,&c,1);putchar(c^c-31>>1);}
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'c' defaults to 'int' [-Wimplicit-int]
main.c:1:14: error: implicit declaration of function 'read' [-Wimplicit-function-declaration]
    1 | main(c){for(;read(0,&c,1);putchar(c^c-31>>1);}
      |              ^~~~
main.c:1:27: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration]
    1 | main(c){for(;read(0,&c,1);putchar(c^c-31>>1);}
      |                           ^~~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'putchar'
  +++ |+#include <stdio.h>
    1 | main(c){for(;read(0,&c,1);putchar(c^c-31>>1);}
main.c:1:45: error: expected ')' before ';' token
    1 | main(c){for(;read(0,&c,1);putchar(c^c-31>>1);}
      |            ~                                ^
      |                                             )
main.c:1:46: error: expected expression before '}' token
    1 | main(c){for(;read(0,&c,1);putchar(c^c-31>>1);}
      |                                              ^
Language: C

#include<stdio.h>
int main(){
  int i=0;
  double a=0,count=0;
 
  while(1){
    scanf("%lf",&a);
    count+=a;
    for(;i<9;i++){
      if((i%2)==0){
    a=a*2.0;
    count+=a;
      }else{
    a=a/3.0;
    count+=a;
      }
    }
    printf("%.8f\n",count);
    count=0;
    i=0;
  }
  return 0;

Compiler output:
main.c: In function 'main':
main.c:22:3: error: expected declaration or statement at end of input
   22 |   return 0;
      |   ^~~~~~
Language: C

#include<stdio.h>
int main(void)
{
  int s[1200]={\0},i;

  scanf("%s,s);

  for(i=0;s[i]=='\n';i++){
    if(s[i]>=65 && s[i]<=90)
      s[i]+=32;
    if(s[i]>=97 && s[i]<=122)
      s[i]-=32

    printf("%c");
  }

  putchar('\n');

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:16: error: stray '\' in program
    4 |   int s[1200]={\0},i;
      |                ^
main.c:6:9: warning: missing terminating " character
    6 |   scanf("%s,s);
      |         ^
main.c:6:9: error: missing terminating " character
    6 |   scanf("%s,s);
      |         ^~~~~~~
main.c:8:3: error: expected expression before 'for'
    8 |   for(i=0;s[i]=='\n';i++){
      |   ^~~
main.c:19:12: error: expected ';' before '}' token
   19 |   return 0;
      |            ^
      |            ;
   20 | }
      | ~
Language: C

#include<stdio.h>
int main(void)
{
  int s[1200]={\0},i;

  scanf("%s,s);

  for(i=0;s[i]=='\n';i++){
    if(s[i]>=65 && s[i]<=90)
      s[i]+=32;
    if(s[i]>=97 && s[i]<=122)
      s[i]-=32;

    printf("%c");
  }

  putchar('\n');

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:16: error: stray '\' in program
    4 |   int s[1200]={\0},i;
      |                ^
main.c:6:9: warning: missing terminating " character
    6 |   scanf("%s,s);
      |         ^
main.c:6:9: error: missing terminating " character
    6 |   scanf("%s,s);
      |         ^~~~~~~
main.c:8:3: error: expected expression before 'for'
    8 |   for(i=0;s[i]=='\n';i++){
      |   ^~~
main.c:19:12: error: expected ';' before '}' token
   19 |   return 0;
      |            ^
      |            ;
   20 | }
      | ~
Language: C

#include<stdio.h>
int main(void)
{
  int s[1200]={\0},i;

  scanf("%s,s);

  for(i=0;s[i]=='\n';i++){
    if(s[i]>=65 && s[i]<=90)
      s[i]+=32;
    if(s[i]>=97 && s[i]<=122)
      s[i]-=32;

    printf("%c",s[i]);
  }

  putchar('\n');

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:16: error: stray '\' in program
    4 |   int s[1200]={\0},i;
      |                ^
main.c:6:9: warning: missing terminating " character
    6 |   scanf("%s,s);
      |         ^
main.c:6:9: error: missing terminating " character
    6 |   scanf("%s,s);
      |         ^~~~~~~
main.c:8:3: error: expected expression before 'for'
    8 |   for(i=0;s[i]=='\n';i++){
      |   ^~~
main.c:19:12: error: expected ';' before '}' token
   19 |   return 0;
      |            ^
      |            ;
   20 | }
      | ~
Language: C

#include<stdio.h>
int main(void)
{
  char s[1200]={\0};
  int i;

  scanf("%s,s);

  for(i=0;s[i]=='\n';i++){
    if(s[i]>=65 && s[i]<=90)
      s[i]+=32;
    if(s[i]>=97 && s[i]<=122)
      s[i]-=32;

    printf("%c",s[i]);
  }

  putchar('\n');

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:17: error: stray '\' in program
    4 |   char s[1200]={\0};
      |                 ^
main.c:7:9: warning: missing terminating " character
    7 |   scanf("%s,s);
      |         ^
main.c:7:9: error: missing terminating " character
    7 |   scanf("%s,s);
      |         ^~~~~~~
main.c:9:3: error: expected expression before 'for'
    9 |   for(i=0;s[i]=='\n';i++){
      |   ^~~
main.c:20:12: error: expected ';' before '}' token
   20 |   return 0;
      |            ^
      |            ;
   21 | }
      | ~
Language: C

#include<stdio.h>
int main(void)
{
  char s[1200]={'\0'};
  int i;

  scanf("%s,s);

  for(i=0;s[i]=='\n';i++){
    if(s[i]>=65 && s[i]<=90)
      s[i]+=32;
    if(s[i]>=97 && s[i]<=122)
      s[i]-=32;

    printf("%c",s[i]);
  }

  putchar('\n');

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: warning: missing terminating " character
    7 |   scanf("%s,s);
      |         ^
main.c:7:9: error: missing terminating " character
    7 |   scanf("%s,s);
      |         ^~~~~~~
main.c:9:3: error: expected expression before 'for'
    9 |   for(i=0;s[i]=='\n';i++){
      |   ^~~
main.c:20:12: error: expected ';' before '}' token
   20 |   return 0;
      |            ^
      |            ;
   21 | }
      | ~
Language: C

#include<stdio.h>
int main(void)
{
  char s[1200]={'\0'};
  int i,a;

  scanf("%s",s);

  for(a=0i=0;s[i]=='\n';i++,a++){
    if(s[i]>=65 && s[i]<=90)
      s[i]+=32;
    if(s[i]>=97 && s[i]<=122)
      s[i]-=32;
  }

  for(i=a-1;i>=0;i--)
    printf("%c",s[i]);

  putchar('\n');

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:11: error: lvalue required as left operand of assignment
    9 |   for(a=0i=0;s[i]=='\n';i++,a++){
      |           ^
Language: C

#include<stdio.h>
int main(void)
{
  char s[1200]={'\0'};
  int i,a;

  scanf("%s",s);

  for(a=0i=0;s[i]=='\0';i++,a++){
    if(s[i]>=65 && s[i]<=90)
      s[i]+=32;
    if(s[i]>=97 && s[i]<=122)
      s[i]-=32;
  }

  for(i=a-1;i>=0;i--)
    printf("%c",s[i]);

  putchar('\n');

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:11: error: lvalue required as left operand of assignment
    9 |   for(a=0i=0;s[i]=='\0';i++,a++){
      |           ^
Language: C

include<stdio.h>
#include<ctype.h>
main(){
  int a=0;
  int b=0;
  int c=0;
  int d=0;
  char A;
  while(scanf("%c",&A)!=EOF){
    if('A'<=A&&A<='Z'){
      A=tolower(A);
    }
    else if('a'<=A&&A<='z'){
      A=toupper(A);
    }
    printf("%c",A);
  }
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    9 |   while(scanf("%c",&A)!=EOF){
      |         ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include<ctype.h>
  +++ |+#include <stdio.h>
    3 | main(){
main.c:9:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    9 |   while(scanf("%c",&A)!=EOF){
      |         ^~~~~
main.c:9:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:25: error: 'EOF' undeclared (first use in this function)
    9 |   while(scanf("%c",&A)!=EOF){
      |                         ^~~
main.c:9:25: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:9:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   16 |     printf("%c",A);
      |     ^~~~~~
main.c:16:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:16:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

include <stdio.h>
main(){
  char ch;
  while(1){
    scanf("%c",&ch);
    if(ch == '\n')break;
    if(isupper(ch)){
      ch=tolower(ch);
    }
    else  if(islower(ch)){
      ch=toupper(ch);
    }
    printf("%c",ch);
  }
  return 0;
}

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

#include <iostream>
#include <sstream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <complex>
#include <vector>
#include <string>
#include <numeric>
#include <cstdio>

#define REP(i,m,n) for(int i=int(m);i<int(n);i++)
#define EACH(i,c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl;
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define BR cout << endl;
#else
#define DEBUG(s) 
#define dump(x)  
#define BR 
#endif
using namespace std;

typedef unsigned int   UI;
typedef unsigned long  UL;
typedef long long      LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<LL> VLL;
typedef vector<string> VS;
typedef pair<int, int> PII;

const double EPS = 1e-10;
const double PI  = acos(-1.0);

template<class T> inline T sqr(T x) {return x*x;}

int main() {
	while (char c, (c = getchar()) != '\0') {
		if (c >= 'a' && i <= 'z') c += ('A' - 'a');
		else if (c >= 'A' && c <= 'Z') c += ('a' - 'A');
		putchar(c);
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:22: error: expected initializer before ',' token
   51 |         while (char c, (c = getchar()) != '\0') {
      |                      ^
a.cc:51:22: error: expected ')' before ',' token
   51 |         while (char c, (c = getchar()) != '\0') {
      |               ~      ^
      |                      )
a.cc:51:22: error: expected primary-expression before ',' token
Language: C++

#include <iostream>
#include <sstream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <complex>
#include <vector>
#include <string>
#include <numeric>
#include <cstdio>

#define REP(i,m,n) for(int i=int(m);i<int(n);i++)
#define EACH(i,c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl;
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define BR cout << endl;
#else
#define DEBUG(s) 
#define dump(x)  
#define BR 
#endif
using namespace std;

typedef unsigned int   UI;
typedef unsigned long  UL;
typedef long long      LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<LL> VLL;
typedef vector<string> VS;
typedef pair<int, int> PII;

const double EPS = 1e-10;
const double PI  = acos(-1.0);

template<class T> inline T sqr(T x) {return x*x;}

int main() {
	while ((char c = getchar()) != '\0') {
		if (c >= 'a' && i <= 'z') c += ('A' - 'a');
		else if (c >= 'A' && c <= 'Z') c += ('a' - 'A');
		putchar(c);
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:17: error: expected primary-expression before 'char'
   51 |         while ((char c = getchar()) != '\0') {
      |                 ^~~~
a.cc:51:17: error: expected ')' before 'char'
   51 |         while ((char c = getchar()) != '\0') {
      |                ~^~~~
      |                 )
a.cc:55:10: error: expected ')' before 'return'
   55 |         }
      |          ^
      |          )
   56 | 
   57 |         return 0;
      |         ~~~~~~
a.cc:51:15: note: to match this '('
   51 |         while ((char c = getchar()) != '\0') {
      |               ^
Language: C++

#include <iostream>
#include <sstream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <complex>
#include <vector>
#include <string>
#include <numeric>
#include <cstdio>

#define REP(i,m,n) for(int i=int(m);i<int(n);i++)
#define EACH(i,c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl;
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define BR cout << endl;
#else
#define DEBUG(s) 
#define dump(x)  
#define BR 
#endif
using namespace std;

typedef unsigned int   UI;
typedef unsigned long  UL;
typedef long long      LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<LL> VLL;
typedef vector<string> VS;
typedef pair<int, int> PII;

const double EPS = 1e-10;
const double PI  = acos(-1.0);

template<class T> inline T sqr(T x) {return x*x;}

int main() {
	char c;
	while ((c = getchar()) != '\0') {
		if (c >= 'a' && i <= 'z') c += ('A' - 'a');
		else if (c >= 'A' && c <= 'Z') c += ('a' - 'A');
		putchar(c);
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:33: error: 'i' was not declared in this scope
   53 |                 if (c >= 'a' && i <= 'z') c += ('A' - 'a');
      |                                 ^
Language: C++

import java.util.Scanner;
class Main {
	public static void main(String[] args){
		Scanner scr = new Scanner(System.in);
		String str;
		str = scr.next();
		StringBuffer stb = new StringBuffer(str);
		char c;
		
		for (int i = 0; i < str.length(); i++){
			c = str.charAt(i);
			if (c >= 'a' && c <= 'z'){
				stb.setCharAt(i, (char) (c - 'a' + 'A'));
			}
			if (c >= 'A' && c <= 'Z'){
				stb.setCharAt(i, (char) (c - 'A' + 'a'));
			}
		}
		System.out.println(stb.toString());
		scr.close();
	}

}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:15: error: expected ':' before 'static'
    3 |         public static void main(String[] args){
      |               ^~~~~~~
      |               :
a.cc:3:33: error: 'String' has not been declared
    3 |         public static void main(String[] args){
      |                                 ^~~~~~
a.cc:3:42: error: expected ',' or '...' before 'args'
    3 |         public static void main(String[] args){
      |                                          ^~~~
a.cc:23:2: error: expected ';' after class definition
   23 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:4:17: error: 'Scanner' was not declared in this scope
    4 |                 Scanner scr = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:5:17: error: 'String' was not declared in this scope
    5 |                 String str;
      |                 ^~~~~~
a.cc:6:17: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |                 str = scr.next();
      |                 ^~~
      |                 std
a.cc:6:23: error: 'scr' was not declared in this scope
    6 |                 str = scr.next();
      |                       ^~~
a.cc:7:17: error: 'StringBuffer' was not declared in this scope
    7 |                 StringBuffer stb = new StringBuffer(str);
      |                 ^~~~~~~~~~~~
a.cc:13:33: error: 'stb' was not declared in this scope; did you mean 'std'?
   13 |                                 stb.setCharAt(i, (char) (c - 'a' + 'A'));
      |                                 ^~~
      |                                 std
a.cc:16:33: error: 'stb' was not declared in this scope; did you mean 'std'?
   16 |                                 stb.setCharAt(i, (char) (c - 'A' + 'a'));
      |                                 ^~~
      |                                 std
a.cc:19:17: error: 'System' was not declared in this scope
   19 |                 System.out.println(stb.toString());
      |                 ^~~~~~
a.cc:19:36: error: 'stb' was not declared in this scope; did you mean 'std'?
   19 |                 System.out.println(stb.toString());
      |                                    ^~~
      |                                    std
Language: C++

#include <stdio.h>

int main(void) {
	char str[1200];
	int i,len;
	
	scanf("%s", str);
	len = strlen(str);
	for(i = 0; len > i; i++){
		char c = str[i];
		if(len >= 97 && len <= 122)
			c -= 32;
		else if(len >= 65 && len <= 90)
			c += 32;
		
		printf("%c", c);
	}
	printf("\n");
	return 0;
}

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

#include<stdio.h>
#include<string.h>
int main(void){
    char a[1200],i,j,k,l;
    gets(a);
    for(i=0;a[i]!='\0';i++){
        if(islower(a[i])){
            a[i] = toupper(a[i]);
        }
        if(isupper(a[i])){
            a[i] = tolower(a[i]);
        }
        printf("%c",a[i]);
    }
    printf("\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    5 |     gets(a);
      |     ^~~~
      |     getw
a.cc:7:12: error: 'islower' was not declared in this scope
    7 |         if(islower(a[i])){
      |            ^~~~~~~
a.cc:8:20: error: 'toupper' was not declared in this scope
    8 |             a[i] = toupper(a[i]);
      |                    ^~~~~~~
a.cc:10:12: error: 'isupper' was not declared in this scope
   10 |         if(isupper(a[i])){
      |            ^~~~~~~
a.cc:11:20: error: 'tolower' was not declared in this scope
   11 |             a[i] = tolower(a[i]);
      |                    ^~~~~~~
Language: C++

#include<stdio.h>
#include<string.h>
int main(void){
    char a[1200],i,j,k,l;
    gets(a);
    for(i=0;a[i]!='\0';i++){
        if(islower(a[i])){
            a[i] = toupper(a[i]);
        }
        else if(isupper(a[i])){
            a[i] = tolower(a[i]);
        }
        printf("%c",a[i]);
    }
    printf("\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    5 |     gets(a);
      |     ^~~~
      |     getw
a.cc:7:12: error: 'islower' was not declared in this scope
    7 |         if(islower(a[i])){
      |            ^~~~~~~
a.cc:8:20: error: 'toupper' was not declared in this scope
    8 |             a[i] = toupper(a[i]);
      |                    ^~~~~~~
a.cc:10:17: error: 'isupper' was not declared in this scope
   10 |         else if(isupper(a[i])){
      |                 ^~~~~~~
a.cc:11:20: error: 'tolower' was not declared in this scope
   11 |             a[i] = tolower(a[i]);
      |                    ^~~~~~~
Language: C++

#include<stdio.h>
#include<string.h>
int main(void){
    char a[1200],i,j,s,t;
    gets(a);
    for(i=0;a[i]!='\0';i++){
        if(islower(a[i])){
            a[i] = toupper(a[i]);
        }
        else if(isupper(a[i])){
            a[i] = tolower(a[i]);
        }
        printf("%c",a[i]);
    }
    printf("\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    5 |     gets(a);
      |     ^~~~
      |     getw
a.cc:7:12: error: 'islower' was not declared in this scope
    7 |         if(islower(a[i])){
      |            ^~~~~~~
a.cc:8:20: error: 'toupper' was not declared in this scope
    8 |             a[i] = toupper(a[i]);
      |                    ^~~~~~~
a.cc:10:17: error: 'isupper' was not declared in this scope
   10 |         else if(isupper(a[i])){
      |                 ^~~~~~~
a.cc:11:20: error: 'tolower' was not declared in this scope
   11 |             a[i] = tolower(a[i]);
      |                    ^~~~~~~
Language: C++

#include <stdio.h>
#include <ctype.h>    /* tolower(  )??¨toupper(  )??§?????? */

char *StrToLower(char *s);
char *StrToUpper(char *s);
void main(void);

  /* ?????????????????±??§??????????°???????????????? */
char *StrToLower(char *s)
{
    char *p;                     /* ????\???¨???????????? */
                                 /* for (  )?????????????????????????????§???p???????????????
                                    ????????¢?????¬??????????????????????????????????????? */
    for (p = s; *p; p++)         /* p???????????§???????????° */
        *p = tolower(*p);        /* p???????????????????°???????????????? */
    return (s);                  /* ????????????????????¢?????¬???????????? */
}

  /* ?????????????????±?°????????????§??????????????? */
char *StrToUpper(char *s)
{
    char *p;                     /* ????\???¨???????????? */
                                 /* for (  )?????????????????????????????§???p???????????????
                                    ????????¢?????¬??????????????????????????????????????? */
    for (p = s; *p; p++)         /* p???????????§???????????° */
        *p = toupper(*p);        /* p????????????????????§??????????????? */
    return (s);                  /* ????????????????????¢?????¬???????????? */
}

void main(void)
{
    char *str1 = "2 Book Shops";
    char *str2 = "3 Bus Stops";

    printf("str1: %s\n", str1);        /* ?°???????????????? */
    printf("StrToLower(str1): %s\n\n", StrToLower(str1));

    printf("str2: %s\n", str2);        /* ??§??????????????? */
    printf("StrToUpper(str2): %s\n", StrToUpper(str2));
}

Compiler output:
a.cc:6:1: error: '::main' must return 'int'
    6 | void main(void);
      | ^~~~
a.cc:30:1: error: '::main' must return 'int'
   30 | void main(void)
      | ^~~~
a.cc: In function 'int main()':
a.cc:32:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   32 |     char *str1 = "2 Book Shops";
      |                  ^~~~~~~~~~~~~~
a.cc:33:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   33 |     char *str2 = "3 Bus Stops";
      |                  ^~~~~~~~~~~~~
Language: C++

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

int main(void){
	char ch, ans;
	while(1){
		scanf("%c", &ch);
		
		if(isupper(ch) != 0) ans = tolower(ch);
		else ans = ch;
		
		printf("%c", ans);
		if(ch == '\n') break;
	}
ツ　ツ　ツ　ツ　printf("\n");
	return 0;
}

Compiler output:
a.cc:17:1: error: extended character 　 is not valid in an identifier
   17 | ツ　ツ　ツ　ツ　printf("\n");
      | ^
a.cc:17:1: error: extended character 　 is not valid in an identifier
a.cc:17:1: error: extended character 　 is not valid in an identifier
a.cc:17:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:17:1: error: '\U000030c4\U00003000\U000030c4\U00003000\U000030c4\U00003000\U000030c4\U00003000printf' was not declared in this scope
   17 | ツ　ツ　ツ　ツ　printf("\n");
      | ^~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <c
using namespace std;

string t = "SHCD";

int w[128][128];
int main(){
	char c;
	while(c=getchar(),~c){
		if('A' <= c && c <= 'Z') cout << c^32;
		else if('a' <= c && c <= 'z') cout << c^32;
		else cout << c;
	}
	cout << endl;
}

Compiler output:
a.cc:5:12: error: missing terminating > character
    5 | #include <c
      |            ^
a.cc:5:10: fatal error: c: No such file or directory
    5 | #include <c
      |          ^
compilation terminated.
Language: C++

#include<stdio.h>
char str[3000000];
int main(){
bool o=false;
while(scanf("%s",str)){
if(o)printf(" ");
for(int i=0;str[i];i++)if((str[i]>='a'&&str[i]<='z')||(str[i]>='A'&&str[i]<='Z'))str[i]^=32;
printf("%s",str);
}
printf("\n");

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected '}' at end of input
   10 | printf("\n");
      |              ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <stdio.h>
#include <string.h>
int main(void){
char buff[256];
int i=0;
int len=0;
	gets(buff);
	len=strlen(buff);
	for (i=0;i<len;i++){
		if (64<buff[i] && buff[i]<91){
			buff[i]=buff[i]+32;
		} else if (96<buff[i] && buff[i]<123){
			buff[i]=buff[i]-32;
		}
	}
	for (i=0;i<len;i++){
		printf("%c", buff[i]);
	}
	printf("\n");
return 0;
}

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

#include <iostream> // C++の入出力
#include <stdio.h> // C の入出力
#include <algorithm> // sort などのアルゴリズム
#include <string.h> // C の文字列用
#include <ctype.h> // C の文字種用
#include <string> // C++の文字列
using namespace std; 
int main(void){
    string in;
    getline(cin,in);
    for(int i=0;i<in.length();i++){
        if(isupper(in[i])){
            in[i]=tolower(in[i]);
        }else if(islower(in[i])){
            in[i]=toupper(in[i]);
        }
    }
    cout << in<<\n;
    return 0;
}

Compiler output:
a.cc:18:17: error: stray '\' in program
   18 |     cout << in<<\n;
      |                 ^
a.cc: In function 'int main()':
a.cc:18:18: error: 'n' was not declared in this scope; did you mean 'in'?
   18 |     cout << in<<\n;
      |                  ^
      |                  in
Language: C++

import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		String t = s.next();
		
		for(int i=0; i < t.length(); i++){
			char c =	t.charAt(i);
			if(Character.isUpperCase(c)){
				c = Character.toLowerCase(c);
			}
			else if (Character.isLowerCase(c)) {
		        c = Character.toUpperCase(c);
		      }
		      System.out.print(c);
		}
		
	}

}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

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

int main()
{
 char c;
 while(true)
 { 
   cin>>c;
   if(isupper(c) != 0)
   { 
     cout<<tolower(c)<<endl;
    }
   else if( islower(c) != 0)
   {
   cout<<toupper(c)<<endl;
    }
   else
   {
   cout<<c<<endl;
   }
  }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:4: error: 'cin' was not declared in this scope
   10 |    cin>>c;
      |    ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<stdio.h>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:13:6: error: 'cout' was not declared in this scope
   13 |      cout<<tolower(c)<<endl;
      |      ^~~~
a.cc:13:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:24: error: 'endl' was not declared in this scope
   13 |      cout<<tolower(c)<<endl;
      |                        ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<stdio.h>
  +++ |+#include <ostream>
    3 | using namespace std;
a.cc:17:4: error: 'cout' was not declared in this scope
   17 |    cout<<toupper(c)<<endl;
      |    ^~~~
a.cc:17:4: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:22: error: 'endl' was not declared in this scope
   17 |    cout<<toupper(c)<<endl;
      |                      ^~~~
a.cc:17:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:21:4: error: 'cout' was not declared in this scope
   21 |    cout<<c<<endl;
      |    ^~~~
a.cc:21:4: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:13: error: 'endl' was not declared in this scope
   21 |    cout<<c<<endl;
      |             ^~~~
a.cc:21:13: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<iostream>
#include<cctype>
#include<stdio.h>
using namespace std;

int main()
{
 string line;
 getline(cin, line)
 {
  for(int i=0; i<line.size(); i++)
  {
   if(islower(line[i]))
    {
      line[i] = toupper(line[i]);
     }
   else if(isupper(line[i]))
    {
      line[i] = tolower(line[i]);
     }
   else
   {
    line[i] = line[i];
   }
  }
 cout<<line[i]<<" "<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before '{' token
    9 |  getline(cin, line)
      |                    ^
      |                    ;
   10 |  {
      |  ~
Language: C++

#include<iostream>
#include<cctype>
#include<stdio.h>
using namespace std;

int main()
{
 string line;
 getline(cin, line)
 
  for(int i=0; i<line.size(); i++)
  {
   if(islower(line[i]))
    {
      line[i] = toupper(line[i]);
     }
   else if(isupper(line[i]))
    {
      line[i] = tolower(line[i]);
     }
   else
   {
    line[i] = line[i];
   }
  }
 cout<<line[i]<<" "<<endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before 'for'
    9 |  getline(cin, line)
      |                    ^
      |                    ;
   10 | 
   11 |   for(int i=0; i<line.size(); i++)
      |   ~~~               
a.cc:11:16: error: 'i' was not declared in this scope
   11 |   for(int i=0; i<line.size(); i++)
      |                ^
Language: C++

#include<iostream>
#include<conio.h>
using namespace std;

int main()
{
	char moji[1000];
	cin.getline(moji, sizeof(moji));
	for(int i=0;i<100;i++){
		if(moji[i]>=65 && moji[i]<=90){        moji[i]+=32;
		}else if(moji[i]>=97 && moji[i]<=122){ moji[i]-=32;
		}
	}
	cout<<moji<<endl;
}

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

#include<iostream>
#include<conio.h>
using namespace std;

void main()
{
	char moji[1000];
	cin.getline(moji, sizeof(moji));
	for(int i=0;i<100;i++){
		if(moji[i]>=65 && moji[i]<=90){
                                 moji[i]+=32;
		}else if(moji[i]>=97 && moji[i]<=122){
                                 moji[i]-=32;
		}
	}
	cout<<moji<<endl;
}

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

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

int main(){
	string str;
	cin >> str;
	transform(str.begin(), str.end(), str.begin(), toupper);
	cout << str << endl;
	return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: no matching function for call to 'transform(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
   10 |         transform(str.begin(), str.end(), str.begin(), toupper);
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:4209:5: note: candidate: 'template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)'
 4209 |     transform(_InputIterator __first, _InputIterator __last,
      |     ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4209:5: note:   template argument deduction/substitution failed:
a.cc:10:18: note:   couldn't deduce template parameter '_UnaryOperation'
   10 |         transform(str.begin(), str.end(), str.begin(), toupper);
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note: candidate: 'template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)'
 4247 |     transform(_InputIterator1 __first1, _InputIterator1 __last1,
      |     ^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4247:5: note:   candidate expects 5 arguments, 4 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _UnaryOperation)'
  156 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result,
      | ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:156:1: note:   candidate expects 5 arguments, 4 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator, _BinaryOperation)'
  162 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
      | ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:162:1: note:   candidate expects 6 arguments, 4 provided
Language: C++

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

int main(){
	char ch;
	
	while(scanf("%c",&ch)){
		if(ch>='A'&&ch<='Z') ch=ch+32;
		else if(ch>='a'&&ch<='z') ch=ch-32;
		cout << ch;
	}
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: expected '}' at end of input
   13 |         return 0;
      |                  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<stdio.h>
#include<cctype>
using namespace std;
int main(void){
	char ch,v;

	while(1){
		scanf("%c",&ch)
		cout<<endl;
		if(islower(ch))
		v=toupper(ch);
		else if (isupper(ch))
	    v=tolower(ch);

		cout<<v;
			
		if( ch == '\n' ) break;
	}
	cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: expected ';' before 'cout'
    9 |                 scanf("%c",&ch)
      |                                ^
      |                                ;
   10 |                 cout<<endl;
      |                 ~~~~
Language: C++

#include<iostream>

using namespace std;

void ltos( char& s );
void stol( char& s );

int main(void)
{
	char str[100];
	gets(str);
	for( int i = 0 ; str[i] != '\0' ; i++ )
	{
		if( str[i] >= 'a' && str[i] <= 'z' ) stol(str[i]);
		else if( str[i] >= 'A' && str[i] <= 'Z' ) ltos(str[i]);
	}
	cout << str << endl;

	return 0;
}

void ltos( char& s )
{
	s += 32;
}
void stol( char& s )
{
	s -= 32;
}

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(str);
      |         ^~~~
      |         getw
Language: C++

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

int main(){
char a[100];
int i;

while(scanf("%s ",a)!=EOF){
for(i=0;i<'\0';i++){
if(isupper(a[i])!=0){
a[i]=tolower(a[i]);
printf("%c",a[i]);
}
else if(islower(a[i])!=0){
a[i]=toupper(a[i]);
printf("%c",a[i]);
}
else{
printf("%c",a[i]);
}
}
printf("\n");

return 0;
}

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

#include<iostream>
#include<string>
using namespace std;
int main(){
  int n;
  string s;
  //cin >> s;
  getline(cin,s);
  //n=s.size();
  for(int i=0;a[i]!='\0';i++){
    if(s[i]>='a' && s[i]<='z'){
      s[i]-=32;
    }
    else if(s[i]>='A' && s[i]<='Z'){
      s[i]+=32;
    }
  }
  cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'a' was not declared in this scope
   10 |   for(int i=0;a[i]!='\0';i++){
      |               ^
Language: C++

import sys
str = raw_input()
for i in str:
  if i.isupper():
    sys.stdout.write(i.lower())
  else:
    sys.stdout.write(i.upper())

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

using namespace std;

int main()
{
  char ch;

  while (1) {
    scanf("%c", &ch);
    
    if (islower(ch)) {
      ch = toupper(ch);
    } else if (isupper(ch)) {
      ch = tolower(ch);
    }

    cout << ch;

    if (ch == '\n') {
      break;
    }
  }
  
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout << ch;
      |     ^~~~
a.cc:4:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <cstdio>
  +++ |+#include <iostream>
    4 |
Language: C++

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

int main() {
	string line,result;
	cin >> line;
	int i=0;
	while(line[i++]!='\0'){
		char c = line[i];
		if(isalpha(c)){
			if(islower(c))
				line[i]=toupper(c);
			else if()
				line[i]=tolower(c);
		}
	}
	cout << result << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: expected primary-expression before ')' token
   14 |                         else if()
      |                                 ^
Language: C++

import java.util.Scanner;
public class　Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
		char t[]=s.toCharArray();
		boolean[] b=new boolean[s.length()];
		for(int i=0;i<s.length();i++){
			if(Character.isUpperCase(t[i]))b[i]=true;
			else if(Character.isLowerCase(t[i]))b[i]=false;
		}
		
		for(int i=0;i<s.length();i++){
			if(b[i]==false)System.out.print(Character.toUpperCase(t[i]));
			else if(b[i]==true)System.out.print(Character.toLowerCase(t[i]));
		}
		System.out.printf("\n");
		sc.close();
		System.exit(0);
	}

}

Compiler output:
a.cc:2:8: error: extended character 　 is not valid in an identifier
    2 | public class　Main {
      |        ^
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class　Main {
      | ^~~~~~
Language: C++

#include<iostream>
#include<cctype>
using namespace std;
int main()
{
	char ch;
	while(true)
	{
		scanf("\c",&ch);
		int islower(char ch);
		if(true) int toupper(char ch);
		else if(false) int tolower(char ch);
		if(ch == '\n')
			break;
	}
	return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: warning: unknown escape sequence: '\c'
    9 |                 scanf("\c",&ch);
      |                       ^~~~
a.cc:16:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 |         return;
      |         ^~~~~~
Language: C++

#include<iostream>
#include<cctype>
using namespace std;
int main()
{
	char ch;
	while(true)
	{
		scanf("\c",&ch);
		int islower(char ch);
		if(true) int toupper(char ch);
		else if(false) int tolower(char ch);
		printf("%c");
		if(ch == '\n')
			break;
	}

	return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: warning: unknown escape sequence: '\c'
    9 |                 scanf("\c",&ch);
      |                       ^~~~
a.cc:18:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   18 |         return;
      |         ^~~~~~
Language: C++

using System;
using System.IO;
using System.Globalization;

public class AOJ100
{
    public static void Main()
    {
        string str = Console.ReadLine();
        string ans = "";
        for (int i = 0; i < str.Length; i++)
        {
            char ch; ch = str[i];
            if ('a' <= ch && ch <= 'z') ans += char.ToUpper(ch);
            else if ('A' <= ch && ch <= 'Z') ans += char.ToLower(ch);
            else ans += ch;
        }
        Console.WriteLine(ans);
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.IO;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Globalization;
      |       ^~~~~~
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public class AOJ100
      | ^~~~~~
Language: C++

#include <iostream>
#include <fstream>
#include <string>

using namespace std;

void main(){
	string s, t;

	while (getline(cin, s, '\n'), s != "END OF INPUT"){
		for (int i = 0; i < s.length(); i++){
			if (isupper(s[i]))
				t += tolower(s[i]);
			else
				t += toupper(s[i]);
		}
		cout << t << endl;
	}
}

Compiler output:
a.cc:7:1: error: '::main' must return 'int'
    7 | void main(){
      | ^~~~
Language: C++

#include <iostream>
#include <fstream>
#include <string>

using namespace std;

int main(){
	string s, t;

	while (getline(cin, s, '\n'), s != "END OF INPUT"){
		for (int i = 0; i < s.length(); i++){
			if (isupper(s[i]))
				t += tolower(s[i]);
			else
				t += toupper(s[i]);
		}
		cout << t << endl;
	}
	]
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: expected primary-expression before ']' token
   19 |         ]
      |         ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	
char c;

while(1){
     cin>>c;
     if(islower(c)){
             c= toupper(c);
       } elseif(isupper(c)){
              c= tolower(c);

        }
        cout <<c;
       if(c="\n")break;

 

}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: 'elseif' was not declared in this scope
   12 |        } elseif(isupper(c)){
      |          ^~~~~~
a.cc:17:13: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   17 |        if(c="\n")break;
      |             ^~~~
      |             |
      |             const char*
Language: C++

#include <iostream>
using namespace std;

int main() {
	


while(1){
     char c;
     cin>>c;
     if(islower(c)){
             c= toupper(c);
       } else if(isupper(c)){
              c= tolower(c);

        }
        cout <<c;
       if(c="\n")break;

 

}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   18 |        if(c="\n")break;
      |             ^~~~
      |             |
      |             const char*
Language: C++

#include <iostream>
using namespace std;

int main() {
	


while(1){
     char c;
     cin>>c;
     if(islower(c)){
             c= toupper(c);
       } else if(isupper(c)){
              c= tolower(c);

        }
        cout <<c;
       if(c=="\n")break;

 

}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |        if(c=="\n")break;
      |           ~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
char ToXOR (char c) {
 return isupper(c) ? tolower(c) : toupper(c)
} 
int main(){
  string str;
  getline( cin, str);
  transform( str.begin(), str.end(), str.begin(), ToXOR);
  cout << str << endl;
}

Compiler output:
a.cc: In function 'char ToXOR(char)':
a.cc:4:45: error: expected ';' before '}' token
    4 |  return isupper(c) ? tolower(c) : toupper(c)
      |                                             ^
      |                                             ;
    5 | }
      | ~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class CountingCharacters {
	public static void main(String[] srgs) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try {
			String line = reader.readLine();
			int[] count = new int[26];
			for(int i=0; i<26; i++) {
				count[i] = 0;
			}
			for(int i=0; i<line.length(); i++) {
				char s = line.charAt(i);
				if(s>='A' && s<='Z') {
					count[s-'A']++;
				} else if(s>='a' && s<='z') {
					count[s-'a']++;
				}
			}
			for(int i=0; i<26; i++) {
				char x = 'a';
				x += i;
				System.out.println(x + " : " + count[i]);
			}
		} catch(IOException e) {
			System.out.println(e);
		} catch(NumberFormatException e) {
			System.out.println("??\????????£????????????????????????");
		}
	}
}

Compiler output:
Main.java:30: error: illegal escape character
			System.out.println("??\?????????????????????????????????");
			                       ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int[] chars = new int[256];
		while (sc.hasNextLine()){
			String line = sc.nextLine();
			for(int i = 0; i < line.length(); i++){
				char ch = Character.toLowerCase(line.charAt(i));
				for(int j = 'a'; j <= 'z'; j++){
					if(ch == j){
						chars[j]++; 
					}
				}
			}
		}
		for(char ch = 'a'; ch <= 'z'; ch++){
			System.out.println(ch + ":" + chars[ch]);
		}
	}
}import java.util.Scanner;

public class Main2{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int[] chars = new int[256];
		while (sc.hasNextLine()){
			String line = sc.nextLine();
			for(int i = 0; i < line.length(); i++){
				char ch = Character.toLowerCase(line.charAt(i));
				for(int j = 'a'; j <= 'z'; j++){
					if(ch == j){
						chars[j]++; 
					}
				}
			}
		}
		for(char ch = 'a'; ch <= 'z'; ch++){
			System.out.println(ch + ":" + chars[ch]);
		}
	}
}

Compiler output:
Main.java:22: error: class, interface, enum, or record expected
}import java.util.Scanner;
 ^
1 error