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

#include <iostream>
using namespace std;

int main(){
  int n, m, l;
  long long A[100][100], B[100][100], C[100][100];

  cin >>n >> m >> l;
  for(int i =0; i<n; i++)
    for(int j=0; j<m; j++) cin >> A[i][j];
  for(int i=0; i<m;i++)
    for(int j=0; j<l; j++) cin >> B[i][j];

  for(int i=0; i<n; i++){
    for(int j=0; j<l; j++){
      C[i][j]=0;
      for(int k=0; k<m; k++){
        C[i][j]+=A[i][k]*B[k][j];
      }
    }
  }
  for(int i=0; i<n; i++){
    for(int j=0; j<l; J++){
      if(j)cout<< " ";
      cout << C[i][j];
    }
    cout <<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:23: error: 'J' was not declared in this scope
   23 |     for(int j=0; j<l; J++){
      |                       ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n, m, l;
  long long A[100][100], B[100][100], C[100][100];

  cin >>n >> m >> l;
  for(int i =0; i<n; i++)
    for(int j=0; j<m; j++) cin >> A[i][j];
  for(int i=0; i<m;i++)
    for(int j=0; j<l; j++) cin >> B[i][j];

  for(int i=0; i<n; i++){
    for(int j=0; j<l; j++){
      C[i][j]=0;
      for(int k=0; k<m; k++){
        C[i][j]+=A[i][k]*B[k][j];
      }
    }
  }
  for(int i=0; i<n; i++){
    for(int j=0; j<l; J++){
      if(j) cout << " ";
      cout << C[i][j];
    }
    cout <<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:23: error: 'J' was not declared in this scope
   23 |     for(int j=0; j<l; J++){
      |                       ^
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
#include<stdio.h>
using namespace std;
int main(){
    int n,m,l;
    int a[n][m];
    int b[m][l];
    int c[n][l];

    int i,j,k;

    for(int i = 0; i <n; i++){
        for(int j = 0; j < l; j ++){
            c[i][j] = 0;
        }
    }
    
    for(int i = 0; i <n; i++){
        for(int j = 0; j < m; j ++){
            cin >> a[i][j];
        }
    }
    for(int j= 0; j <m; j++){
        for(int k = 0; k < l; k ++){
            cin >> b[j][k];
        }
    }
    for(int i= 0; i<n;  i++){
        for(int j=0; j<l; j++){
            for(int k = 0; k < m; k++){
                c[i][j] += a[i][k] * b[k][j]
            }
        }
    }


    for(int i = 0; i <n; i++){
        for(int j = 0; j < l; j ++){
            if(j!=l-1){
                cout << c[i][j] << " " << endl;
            }else{
                cout << c[i][j] << endl;
            }
        }
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:45: error: expected ';' before '}' token
   48 |                 c[i][j] += a[i][k] * b[k][j]
      |                                             ^
      |                                             ;
   49 |             }
      |             ~
Language: C++

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

int main(){
  long long n, m, l, b[100][100], a[100][100], c[100][100] = {};
  cin >> n >> m >> l;
  for(int i = 0; i < n; i++){
    for(int j = 0; j < m; j++){
      cin >> a[i][j];
    }
  }
  for(int i = 0; i < m; i++){
    for(int j = 0; j < l; j++){
      cin >> b[i][j];
    }
  }
  for(int i = 0; i < n; i++){
    for(int j = 0; j < m; j++){
      for(int k = 0; k < l; k++){
        c[i][k] += a[i][j] * b[j][k];
      }
    }
  }
  for(int i=0;i<n;i++){
				for(int j=0;j<l;j++){
					if(j!=l-1)cout<<C[i][j]<<" ";
					else cout<<C[i][j]<<endl;
				}
			}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:26:57: error: 'C' was not declared in this scope
   26 |                                         if(j!=l-1)cout<<C[i][j]<<" ";
      |                                                         ^
a.cc:27:52: error: 'C' was not declared in this scope
   27 |                                         else cout<<C[i][j]<<endl;
      |                                                    ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n,m,l;
	cin>>n>>m>>l;
	int A[100][100],B[100][100],C[100][100]={}
	for(int i=0;i<n;i++){
		for(int j=0;j<m;j++){
			cin>>A[i][j];
		}
	}
	
	for(int i=0;i<m;i++){
		for(int j=0;j<l;j++){
			cin>>B[i][j];
		}
	}
		
		for(int i=0;i<n;i++){
			for(int j=0;j<m; j++){
				for(int k=0;k<l;k++){
					C[i][k]+=A[i][j]*B[j][k];
					}
				}
			}
			
			for(int i=0;i<n;i++){
				for(int j=0;j<l;j++){
					if(j!=l-1)cout<<C[i][j]<<" ";
					else cout<<C[i][j]<<endl;
				}
			}
			
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected ',' or ';' before 'for'
    8 |         for(int i=0;i<n;i++){
      |         ^~~
a.cc:8:21: error: 'i' was not declared in this scope
    8 |         for(int i=0;i<n;i++){
      |                     ^
Language: C++

#include<iostream>
using namespace std;

int main(){

	//　宣言、入力、初期化
	int n, m, l;
	cin >> n >> m >> l;

	int A[n][m], B[m][l], C[n][l];

	for(int i=0; i<n; i++){
		for(int j=o; j<m; j++){
			cin >> A[i][j];
		}
	}

	for(int i=0; i<m; i++){
		for(int j=o; j<l; j++){
			cin >> B[m][l];
		}
	}

	for(int i=0; i<n; i++){
		for(int j=0; j<l; j++){
			C[n][l] = 0;
		}
	}

	//計算
	for(int i=0; i<n; i++){
		for(int j=o; j<l; j++){
			for(int k=0; k<m; k++){
				C[i][j] = A[i][k]*B[k][j];

			}
		}
	}

	//出力
	for(int i=0; i<n; i++){
		for(int j=0; j<l; j++){
			if(j>0) cout << " ";
			cout << C[i][j];
		}
		cout << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:27: error: 'o' was not declared in this scope
   13 |                 for(int j=o; j<m; j++){
      |                           ^
a.cc:19:27: error: 'o' was not declared in this scope
   19 |                 for(int j=o; j<l; j++){
      |                           ^
a.cc:32:27: error: 'o' was not declared in this scope
   32 |                 for(int j=o; j<l; j++){
      |                           ^
Language: C++

#include<iostream>
using namespace std;

int main(){

	//　宣言、入力、初期化
	int n, m, l;
	cin >> n >> m >> l;

	int A[n][m], B[m][l], C[n][l];

	for(int i=0; i<n; i++){
		for(int j=0; j<m; j++){
			cin >> A[i][j];
		}
	}

	for(int i=0; i<m; i++){
		for(int j=0; j<l; j++){
			cin >> B[m][l];
		}
	}

	for(int i=0; i<n; i++){
		for(int j=0; j<l; j++){
			C[n][l] = 0;
		}
	}

	//計算
	for(int i=0; i<n; i++){
		for(int j=o; j<l; j++){
			for(int k=0; k<m; k++){
				C[i][j] = A[i][k]*B[k][j];

			}
		}
	}

	//出力
	for(int i=0; i<n; i++){
		for(int j=0; j<l; j++){
			if(j>0) cout << " ";
			cout << C[i][j];
		}
		cout << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:27: error: 'o' was not declared in this scope
   32 |                 for(int j=o; j<l; j++){
      |                           ^
Language: C++


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

char *gets(char *s);

int main()
{
	char buf[300], *t, *h, *p;
	int taro, hanako;
	int i, n, ret;

	gets(buf);
	n = atoi(buf);
	taro = hanako = 0;
	for (i = 0; i < n; i++) {
		gets(buf); p = buf;

		while (isspace(*p)) p++;
		t = p;
		while (isalpha(*p)) p++;
		*p++ = 0;

		while (isspace(*p)) p++;
		h = p;
		while (isalpha(*p)) p++;
		*p++ = 0;

		ret = strcmp(t, h);
		if (ret > 0) taro += 3;
		else if (ret < 0) hanako += 3;
		else taro++, hanako++;
	}
	printf("%d %d\n", taro, hanako);
	return 0;
}



Compile Error Logs: 

 

ステータス 
Judge: 4/4 C CPU: 00:00 sec Memory: 536 KB Length: 623 B 2017-07-28 06:33 
テストケースの判定結果 
Case # Verdict CPU Time Memory In Out Case Name 

Case #1 : Accepted 00:00 532 18 4 testcase_00 
Case #2 : Accepted 00:00 536 119 6 testcase_01 
Case #3 : Accepted 00:00 536 1310 8 testcase_02 
Case #4 : Accepted 00:00 532 5951 10 testcase_03 



 < prev |  /   | next >      

 

Judge Input #  (  | )  Judge Output #  (  | ) 


  

 



Compiler output:
a.cc:49:6: error: stray '#' in program
   49 | Case # Verdict CPU Time Memory In Out Case Name
      |      ^
a.cc:51:6: error: stray '#' in program
   51 | Case #1 : Accepted 00:00 532 18 4 testcase_00
      |      ^
a.cc:52:6: error: stray '#' in program
   52 | Case #2 : Accepted 00:00 536 119 6 testcase_01
      |      ^
a.cc:53:6: error: stray '#' in program
   53 | Case #3 : Accepted 00:00 536 1310 8 testcase_02
      |      ^
a.cc:54:6: error: stray '#' in program
   54 | Case #4 : Accepted 00:00 532 5951 10 testcase_03
      |      ^
a.cc:62:13: error: stray '#' in program
   62 | Judge Input #  (  | )  Judge Output #  (  | )
      |             ^
a.cc:62:37: error: stray '#' in program
   62 | Judge Input #  (  | )  Judge Output #  (  | )
      |                                     ^
a.cc:42:1: error: 'Compile' does not name a type
   42 | Compile Error Logs:
      | ^~~~~~~
Language: Java

import java.util.*;
import java.lang.*;



public class Main {
    public static void main(String[] args){
     Scanner sc= new Scanner(System.in);
    
    
     String str=sc.nextLine();
     char[] moji=str.toCharArray();
     for(int i=0;i<str.length();i++){
         if(Character.toUpperCase(moji[i])){
             moji[i]=Character.isLowerCase(moji[i]);
         }else if(Character.isLowerCase(moji[i])){
             moji[i]=Character.toUpperCase(moji[i]);
         }
         
         
         
     }System.out.println(moji);
      
      
    } 
     
}



Compiler output:
Main.java:14: error: incompatible types: char cannot be converted to boolean
         if(Character.toUpperCase(moji[i])){
                                 ^
Main.java:15: error: incompatible types: boolean cannot be converted to char
             moji[i]=Character.isLowerCase(moji[i]);
                                          ^
2 errors
Language: Java

import java.util.*;
import java.lang.*;



public class Main {
    public static void main(String[] args){
     Scanner sc= new Scanner(System.in);
    
    
     String str=sc.nextLine();
     
     for(int i=0;i<str.length();i++){
         
         if(Character.toUpperCase(str.charAt(i))){
            System.out.print(Character.isLowerCase(str.charAt(i))) ;
         }else if(Character.isLowerCase(str.charAt(i))){
            System.out.print(Character.toUpperCase(str.charAt(i)));
         }
         
         
         
     }System.out.println("");
      
      
    } 
     
}




Compiler output:
Main.java:15: error: incompatible types: char cannot be converted to boolean
         if(Character.toUpperCase(str.charAt(i))){
                                 ^
1 error
Language: Java

import java.util.*;
import java.lang.*;



public class Main {
    public static void main(String[] args){
     Scanner sc= new Scanner(System.in);
    
    
     String str=sc.nextLine();
     
     for(int i=0;i<str.length();i++){
         
         if(Character.toUpperCase(str.charAt(i))){
            System.out.print(Character.isLowerCase(str.charAt(i))) ;
         }else if(Character.isLowerCase(str.charAt(i))){
            System.out.print(Character.toUpperCase(str.charAt(i)));
         }else{

         System.out.print(charAt(i));
         
         
     }System.out.println("");
      
      
    } 
     
}




Compiler output:
Main.java:29: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.*;
import java.lang.*;



public class Main {
    public static void main(String[] args){
     Scanner sc= new Scanner(System.in);
    
    
     String str=sc.nextLine();
     
     for(int i=0;i<str.length();i++){
         
         if(Character.toUpperCase(str.charAt(i))){
            System.out.print(Character.isLowerCase(str.charAt(i))) ;
         }else if(Character.isLowerCase(str.charAt(i))){
            System.out.print(Character.toUpperCase(str.charAt(i)));
         }else{

         System.out.print(charAt(i));}
         
         
     }System.out.println("");
      
      
    } 
     
}




Compiler output:
Main.java:15: error: incompatible types: char cannot be converted to boolean
         if(Character.toUpperCase(str.charAt(i))){
                                 ^
Main.java:21: error: cannot find symbol
         System.out.print(charAt(i));}
                          ^
  symbol:   method charAt(int)
  location: class Main
2 errors
Language: Java

import java.util.*;
import java.lang.*;



public class Main {
    public static void main(String[] args){
     Scanner sc= new Scanner(System.in);
    
    
     String str=sc.nextLine();
     
     for(int i=0;i<str.length();i++){
         
         if(Character.isUpperCase(str.charAt(i))){
            System.out.print(Character.isLowerCase(str.charAt(i))) ;
         }else if(Character.isLowerCase(str.charAt(i))){
            System.out.print(Character.isUpperCase(str.charAt(i)));
         }else{

         System.out.print(charAt(i));}
         
         
     }System.out.println("");
      
      
    } 
     
}




Compiler output:
Main.java:21: error: cannot find symbol
         System.out.print(charAt(i));}
                          ^
  symbol:   method charAt(int)
  location: class Main
1 error
Language: Java

import java.util.*;
import java.lang.*;



public class Main {
    public static void main(String[] args){
     Scanner sc= new Scanner(System.in);
    
    
     String str=sc.nextLine();
     
     for(int i=0;i<str.length();i++){
         
         if(Character.isUpperCase(str.charAt(i))){
            System.out.print(Character.isLowerCase(str.charAt(i))) ;
         }else if(Character.isLowerCase(str.charAt(i))){
            System.out.print(Character.isUpperCase(str.charAt(i)));
         }else{

         System.out.print(charAt(i));
         
        } 
       
     }System.out.println("");
      
      
   
}}




Compiler output:
Main.java:21: error: cannot find symbol
         System.out.print(charAt(i));
                          ^
  symbol:   method charAt(int)
  location: class Main
1 error
Language: Java

import java.util.*;
import java.lang.*;



public class Main {
    public static void main(String[] args){
     Scanner sc= new Scanner(System.in);
    
    
     String str=sc.nextLine();
     
     for(int i=0;i<str.length();i++){
         
         if(Character.isUpperCase(str.charAt(i))){
            System.out.print(Character.isLowerCase(str.charAt(i))) ;
         }else if(Character.isLowerCase(str.charAt(i))){
            System.out.print(Character.ToUpperCase(str.charAt(i)));
         }else{

         System.out.print(str.charAt(i));
         
        } 
       
     }System.out.println("");
      
      
   
}}




Compiler output:
Main.java:18: error: cannot find symbol
            System.out.print(Character.ToUpperCase(str.charAt(i)));
                                      ^
  symbol:   method ToUpperCase(char)
  location: class Character
1 error
Language: Java

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

public class toggingcases {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			StringBuilder b1 = new StringBuilder(str);

			for(int i=0; i < str.length(); i++) {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				   //System.out.println(str.charAt(i));
				}
			}
			String t = b1.toString();
			System.out.println(t);

		}catch(IOException e) {
			System.out.println("Exception : " + e);
		}
	}
}


Compiler output:
Main.java:5: error: class toggingcases is public, should be declared in a file named toggingcases.java
public class toggingcases {
       ^
1 error
Language: Java

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

public class toggingcases {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			StringBuilder b1 = new StringBuilder(str);

			for(int i=0; i < str.length(); i++) {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				}
			}
			String t = b1.toString();
			System.out.println(t);

		}catch(IOException e) {
			System.out.println("Exception : " + e);
		}
	}
}


Compiler output:
Main.java:5: error: class toggingcases is public, should be declared in a file named toggingcases.java
public class toggingcases {
       ^
1 error
Language: Java

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

public class ITP1_8_A {
    public static void main(String[] args) {
        FastReader f = new FastReader();
        String line = f.nextLine();
        StringBuilder sb = new StringBuilder();

        for (char ch : line.toCharArray()) {
            if (ch == ' ') {
                sb.append(ch);
            } else if (ch < 97) {
                sb.append(Character.toChars(ch + 32));
            } else {
                sb.append(Character.toChars(ch - 32));
            }
        }
        System.out.println(sb);


    }

    // Helper class to speed up IO
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}



Compiler output:
Main.java:6: error: class ITP1_8_A is public, should be declared in a file named ITP1_8_A.java
public class ITP1_8_A {
       ^
1 error
Language: Java

import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class　Main{

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		String a = sc.nextLine();
		
		Pattern p1= Pattern.compile("[,a-z||.a-z]");
		Matcher m1=p1.matcher(a);
		
		Pattern p2= Pattern.compile("[,A-Z||.A-Z]");
		Matcher m2=p2.matcher(a);
		
		if(m1.find()) {
			String upper_str1 = a.toUpperCase();
			System.out.println(upper_str1);
		}else if(m2.find()){
			 String lower_str1 = a.toLowerCase();
			 System.out.println(lower_str1);
		}else {
			System.out.println(a);
		}
		
	}

}



Compiler output:
Main.java:5: error: illegal character: '\u3000'
public class?Main{
            ^
1 error
Language: Java

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


public class CopyOfMain01_08A {

	public static void main(String[] args) throws IOException {
		// 入力導入部
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String st=br.readLine();
		String[] str=st.split("");

		for(int i=0;i<str.length;i++){
			if(str[i].equals(str[i].toLowerCase())){
				System.out.print(str[i].toUpperCase());
			}else System.out.print(str[i].toLowerCase());
		}



}}

Compiler output:
Main.java:6: error: class CopyOfMain01_08A is public, should be declared in a file named CopyOfMain01_08A.java
public class CopyOfMain01_08A {
       ^
1 error
Language: Java

public class Main{
    public static void main(String[]args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        for (char c: str.toCharArray()){
            if(Character.isLowerCase(c)){
                System.out.print(Character.toUpperCase(c));
            }else{
                System.out.print(Character.toLowerCase(c));
            }
        }
         System.out.println();
        
        
        
    }

        
}

Compiler output:
Main.java:2: error: cannot find symbol
    public static void main(String[]args) throws IOException{
                                                 ^
  symbol:   class IOException
  location: class Main
Main.java:3: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                ^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                                   ^
  symbol:   class InputStreamReader
  location: class Main
4 errors
Language: Java

import java.util.*;
import java.text.*;

class Main {
    public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        char [] cs = sc.nextLine().toCharArray();
        for(int i = 0; i < line.length; i++) {
            if(cs[i] >= 'A' && cs[i] <= 'Z') cs[i] = (char)(cs[i] + 0x20);
            else if(cs[i] >= 'a' && cs[i] <= 'z') cs[i] = (char)(cs[i] - 0x20);
        }
        System.out.println(new String(cs));
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        for(int i = 0; i < line.length; i++) {
                           ^
  symbol:   variable line
  location: class Main
1 error
Language: Java

import Control.Applicative
import Data.Char

main = do
    str <- fmap toggleChar <$> getLine
    putStrLn str

toggleChar :: Char -> Char
toggleChar x
    | isLower x = toUpper x
    | isUpper x = toLower x
    | otherwise = x

Compiler output:
Main.java:1: error: ';' expected
import Control.Applicative
                          ^
Main.java:2: error: ';' expected
import Data.Char
                ^
2 errors
Language: Java

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



public class test{
	public static void main(String[] args){


		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String[] text;
		int text_num;

		try{
			text=reader.readLine().split("");

		text_num=text.length;

		for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		}System.out.println();


		reader.close();

		}catch(IOException e){
			System.out.println("??????:"+e);
		}




	}
}

Compiler output:
Main.java:7: error: class test is public, should be declared in a file named test.java
public class test{
       ^
1 error
Language: Java

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



public class test{
	public static void main(String[] args){


		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String[] text;
		int text_num;

		try{
			text=reader.readLine().split("");

		text_num=text.length;

		for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
			System.out.println();
		}


		reader.close();

		}catch(IOException e){
			System.out.println("??????:"+e);
		}




	}
}

Compiler output:
Main.java:7: error: class test is public, should be declared in a file named test.java
public class test{
       ^
1 error
Language: Java

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



public class test{
	public static void main(String[] args){


		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String[] text;
		int text_num;

		try{
			text=reader.readLine().split("");

		text_num=text.length;

		for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
			System.out.println("");
		}


		reader.close();

		}catch(IOException e){
			System.out.println("??????:"+e);
		}




	}
}

Compiler output:
Main.java:7: error: class test is public, should be declared in a file named test.java
public class test{
       ^
1 error
Language: Java

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



public class test{
	public static void main(String[] args){


		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String[] text;
		int text_num;

		try{
			text=reader.readLine().split("");

		text_num=text.length;

		for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		}


		reader.close();

		}catch(IOException e){
			System.out.println("??????:"+e);
		}




	}
}

Compiler output:
Main.java:7: error: class test is public, should be declared in a file named test.java
public class test{
       ^
1 error
Language: Java

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

class Main {
	public static void main(String[] args) throws IOException{
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	String input = br.readLine();
    	char [] c = input.toCharArray();
    	for(int i = 0;i <c.length; i++){
    		if(Character.isUpperCase(c[i])){
    			c[i] = Character.toLowerCase(c[i]);
    		}
    		else if(Character.isLowerCase(c[i])){
    			c[i] = Character.toUpperCase(c[i]);
    		}
    		else{
    			c[i] = c[i];
    		}
    	}
    	System.out.println(c[i]);
    }
}

Compiler output:
Main.java:21: error: cannot find symbol
    	System.out.println(c[i]);
    	                     ^
  symbol:   variable i
  location: class Main
1 error
Language: Java

import java.io.*;

class Main {

	public static void main(String args[])throws IOException {
		DataInputStream dis = new DataInputStream(System.in);
		
		String str = dis.readLine();
		
		char ch[] = str.toCharArray();
		
		for(int i = 0; i < ch.length; i++){
			if(Character.isUpperCase(ch[i])){
				ch[i] = Character.toLowerCase(ch[i]);
			}else ch[i] = Character.toUpperCase(ch[i]);
		}
		for(int i = 0; i < ch.length; i++){
			System.out.print(ch[i]);
		}	
		System.out.println();

Compiler output:
Main.java:20: error: reached end of file while parsing
		System.out.println();
		                     ^
1 error
Language: Java

import java.io.*;
import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        Scanner scan = new Scanner(System.in);
        
        char c[] = scan.nextChar();
        for(int i = 0; i < c.length; i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            }else{
                c[i] = c[i];
            }
        }
        
        System.out.println(c);
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        char c[] = scan.nextChar();
                       ^
  symbol:   method nextChar()
  location: variable scan of type Scanner
1 error
Language: Java

import java.io.*;
import java.util.Scanner;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
    public static void main(String args[]){
        Scanner scan = new Scanner(System.in);
        
        char c[] = scan.nextChar();
        for(int i = 0; i < c.length; i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            }else{
                c[i] = c[i];
            }
        }
        
        System.out.println(c);
    }
}

Compiler output:
Main.java:11: error: cannot find symbol
        char c[] = scan.nextChar();
                       ^
  symbol:   method nextChar()
  location: variable scan of type Scanner
1 error
Language: Java

import java.io.*;
import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        Scanner scan = new Scanner(System.in);
        
        string c[] = scan.nextString();
        for(int i = 0; i < c.length; i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            }else{
                c[i] = c[i];
            }
        }
        
        System.out.println(c);
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        string c[] = scan.nextString();
        ^
  symbol:   class string
  location: class Main
Main.java:8: error: cannot find symbol
        string c[] = scan.nextString();
                         ^
  symbol:   method nextString()
  location: variable scan of type Scanner
2 errors
Language: Java

import java.io.*;
import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        Scanner scan = new Scanner(System.in);
        
        string c[] = scan.next();
        for(int i = 0; i < c.length; i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            }else{
                c[i] = c[i];
            }
        }
        
        System.out.println(c);
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        string c[] = scan.next();
        ^
  symbol:   class string
  location: class Main
1 error
Language: Java

import java.io.*;
import java.util.Scanner;

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

Compiler output:
Main.java:8: error: incompatible types: String cannot be converted to String[]
        String c[] = scan.next();
                              ^
Main.java:10: error: no suitable method found for isUpperCase(String)
            if(Character.isUpperCase(c[i])){
                        ^
    method Character.isUpperCase(char) is not applicable
      (argument mismatch; String cannot be converted to char)
    method Character.isUpperCase(int) is not applicable
      (argument mismatch; String cannot be converted to int)
Main.java:11: error: no suitable method found for toLowerCase(String)
                c[i] = Character.toLowerCase(c[i]);
                                ^
    method Character.toLowerCase(char) is not applicable
      (argument mismatch; String cannot be converted to char)
    method Character.toLowerCase(int) is not applicable
      (argument mismatch; String cannot be converted to int)
Main.java:12: error: no suitable method found for isLowerCase(String)
            }else if(Character.isLowerCase(c[i])){
                              ^
    method Character.isLowerCase(char) is not applicable
      (argument mismatch; String cannot be converted to char)
    method Character.isLowerCase(int) is not applicable
      (argument mismatch; String cannot be converted to int)
Main.java:13: error: no suitable method found for toUpperCase(String)
                c[i] = Character.toUpperCase(c[i]);
                                ^
    method Character.toUpperCase(char) is not applicable
      (argument mismatch; String cannot be converted to char)
    method Character.toUpperCase(int) is not applicable
      (argument mismatch; String cannot be converted to int)
5 errors
Language: Java

import java.io.*;
import java.io.*;
//import java.util.Scanner;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
    public static void main(String args[]){
//        Scanner scan = new Scanner(System.in);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        char [] c = input.toCharArray();
//        String c[] = scan.next();
        for(int i = 0; i < c.length; i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            }else{
                c[i] = c[i];
            }
        }
        
        System.out.println(c);
    }
}

Compiler output:
Main.java:12: error: unreported exception IOException; must be caught or declared to be thrown
        String input = br.readLine();
                                  ^
1 error
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		StrinBuilder sb = new StringBuilder();
		String s,t;
		for(int i = 0; i < str.length(); i++){
			if(Character.isUpperCase(str.charAt(i)){
				s = (String) str.charAt(i).toLowerCase();
			} else if(Character.isLowerCase(str.charAt(i){
				s = (String) str.charAt(i).toUpperCase();
			}
			sb.append(s);
		}
		t = sb.toString();
		System.out.println(t);
	}
}

Compiler output:
Main.java:11: error: ')' expected
			if(Character.isUpperCase(str.charAt(i)){
			                                       ^
Main.java:13: error: ')' or ',' expected
			} else if(Character.isLowerCase(str.charAt(i){
			                                             ^
2 errors
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		StrinBuilder sb = new StringBuilder();
		String s,t;
		for(int i = 0; i < str.length(); i++){
			if(Character.isUpperCase(str.charAt(i))){
				s = (String) str.charAt(i).toLowerCase();
			} else if(Character.isLowerCase(str.charAt(i))){
				s = (String) str.charAt(i).toUpperCase();
			}
			sb.append(s);
		}
		t = sb.toString();
		System.out.println(t);
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
		StrinBuilder sb = new StringBuilder();
		^
  symbol:   class StrinBuilder
  location: class Main
Main.java:12: error: char cannot be dereferenced
				s = (String) str.charAt(i).toLowerCase();
				                          ^
Main.java:14: error: char cannot be dereferenced
				s = (String) str.charAt(i).toUpperCase();
				                          ^
3 errors
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		StringBuilder sb = new StringBuilder();
		String s,t;
		for(int i = 0; i < str.length(); i++){
			if(Character.isUpperCase(str.charAt(i))){
				s = String.valueOf(str.charAt(i)).toLowerCase();
			} else if(Character.isLowerCase(str.charAt(i))){
				s = String.valueOf(str.charAt(i)).toUpperCase();
			}
			sb.append(s);
		}
		t = sb.toString();
		System.out.println(t);
	}
}

Compiler output:
Main.java:16: error: variable s might not have been initialized
			sb.append(s);
			          ^
1 error
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		String input = scan.nextLine();
		StringBuffer sb = new StringBuffer();
		for(int i = 0; i < input.length(); i++){
			char ch = input.charAt(i);
			if(ch.isLowerCase()){
				ch = ch.toUpperCase();
			} else if(ch.isUpperCase()){
				ch = ch.toLowerCase();
			}
			sb.append(ch);
		}
		String output = sb.toString();
		System.out.println(output);
	}
}

Compiler output:
Main.java:11: error: char cannot be dereferenced
			if(ch.isLowerCase()){
			     ^
Main.java:12: error: char cannot be dereferenced
				ch = ch.toUpperCase();
				       ^
Main.java:13: error: char cannot be dereferenced
			} else if(ch.isUpperCase()){
			            ^
Main.java:14: error: char cannot be dereferenced
				ch = ch.toLowerCase();
				       ^
4 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		String input = scan.nextLine();
		StringBuffer sb = new StringBuffer();
		for(int i = 0; i < input.length(); i++){
			char ch = input.charAt(i);
			String c = null;
			if(String.valueOf(ch).isLowerCase()){
				c = String.valueOf(ch).toUpperCase();
			} else if(String.valueOf(ch).isUpperCase()){
				c = String.valueOf(ch).toLowerCase();
			}
			sb.append(c);
		}
		String output = sb.toString();
		System.out.println(output);
	}
}

Compiler output:
Main.java:12: error: cannot find symbol
			if(String.valueOf(ch).isLowerCase()){
			                     ^
  symbol:   method isLowerCase()
  location: class String
Main.java:14: error: cannot find symbol
			} else if(String.valueOf(ch).isUpperCase()){
			                            ^
  symbol:   method isUpperCase()
  location: class String
2 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		String input = scan.nextLine();
		StringBuffer sb = new StringBuffer();
		for(int i = 0; i < input.length(); i++){
			char ch = input.charAt(i);
			String c = String.valueOf(ch);
			if(c.isLowerCase()){
				c = c.toUpperCase();
			} else if(c.isUpperCase()){
				c = c.toLowerCase();
			}
			sb.append(c);
		}
		String output = sb.toString();
		System.out.println(output);
	}
}

Compiler output:
Main.java:12: error: cannot find symbol
			if(c.isLowerCase()){
			    ^
  symbol:   method isLowerCase()
  location: variable c of type String
Main.java:14: error: cannot find symbol
			} else if(c.isUpperCase()){
			           ^
  symbol:   method isUpperCase()
  location: variable c of type String
2 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		String input = scan.nextLine();
		StringBuffer sb = new StringBuffer();
		for(int i = 0; i < input.length(); i++){
			char ch = input.charAt(i);
			String c = String.valueOf(ch);
			if(ch.isLowerCase()){
				c = c.toUpperCase();
			} else if(ch.isUpperCase()){
				c = c.toLowerCase();
			}
			sb.append(c);
		}
		String output = sb.toString();
		System.out.println(output);
	}
}

Compiler output:
Main.java:12: error: char cannot be dereferenced
			if(ch.isLowerCase()){
			     ^
Main.java:14: error: char cannot be dereferenced
			} else if(ch.isUpperCase()){
			            ^
2 errors
Language: Java

mport java.io.*;
 
public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        for(char c: str.toCharArray()){
            if(Character.isUpperCase(c)){
            System.out.print(Character.toLowerCase(c));
            }else{
            System.out.print(Character.toUpperCase(c));
            }
        }
        System.out.println();
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.io.*;
^
1 error
Language: Java

import com.sun.org.apache.regexp.internal.CharacterArrayCharacterIterator;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		for(int i=0;i<s.length();i++) {
			char ch = s.charAt(i);
			if(Character.isLowerCase(ch) == true) {
				ch = Character.toUpperCase(ch);
			} else if(Character.isUpperCase(ch) == true) {
				ch = Character.toLowerCase(ch);
			}
			System.out.print(ch);
		}
		System.out.println("");
	}
}

Compiler output:
Main.java:1: error: package com.sun.org.apache.regexp.internal does not exist
import com.sun.org.apache.regexp.internal.CharacterArrayCharacterIterator;
                                         ^
1 error
Language: Java

import java.io.*;
public class Main{
 public static void main(String[] args){
 BufferedReader br=new BefferedReader(System.in);
     String input=br.readLine();
     for(int i=0;i<input.length();i++){
         char a=input.charAt(i);
         if(Charracter.isUpperCase(a)){
           System.out.print(Character.toLowerCase(a));
         }else{
               system.out.print(Character.toUpperCase(a));
         }
     }
     System.out.print("\n");
 }
}

Compiler output:
Main.java:4: error: cannot find symbol
 BufferedReader br=new BefferedReader(System.in);
                       ^
  symbol:   class BefferedReader
  location: class Main
Main.java:8: error: cannot find symbol
         if(Charracter.isUpperCase(a)){
            ^
  symbol:   variable Charracter
  location: class Main
Main.java:11: error: package system does not exist
               system.out.print(Character.toUpperCase(a));
                     ^
3 errors
Language: Java

import java.io.*;
public class Main{
 public static void main(String[] args){
 BufferedReader br=new BefferedReader(new InputStreamReader(System.in));
     String input=br.readLine();
     for(int i=0;i<input.length();i++){
         char a=input.charAt(i);
         if(Charracter.isUpperCase(a)){
           System.out.print(Character.toLowerCase(a));
         }else{
               system.out.print(Character.toUpperCase(a));
         }
     }
     System.out.print("\n");
 }
}

Compiler output:
Main.java:4: error: cannot find symbol
 BufferedReader br=new BefferedReader(new InputStreamReader(System.in));
                       ^
  symbol:   class BefferedReader
  location: class Main
Main.java:8: error: cannot find symbol
         if(Charracter.isUpperCase(a)){
            ^
  symbol:   variable Charracter
  location: class Main
Main.java:11: error: package system does not exist
               system.out.print(Character.toUpperCase(a));
                     ^
3 errors
Language: Java

import java.io.*;
public class Main{
 public static void main(String[] args)throws IOException{
 BufferedReader br=new BefferedReader(new InputStreamReader(System.in));
     String input=br.readLine();
     for(int i=0;i<input.length();i++){
         char a=input.charAt(i);
         if(Charracter.isUpperCase(a)){
           System.out.print(Character.toLowerCase(a));
         }else{
               system.out.print(Character.toUpperCase(a));
         }
     }
     System.out.print("\n");
 }
}

Compiler output:
Main.java:4: error: cannot find symbol
 BufferedReader br=new BefferedReader(new InputStreamReader(System.in));
                       ^
  symbol:   class BefferedReader
  location: class Main
Main.java:8: error: cannot find symbol
         if(Charracter.isUpperCase(a)){
            ^
  symbol:   variable Charracter
  location: class Main
Main.java:11: error: package system does not exist
               system.out.print(Character.toUpperCase(a));
                     ^
3 errors
Language: Java

import java.io.*;
public class Main{
 public static void main(String[] args)throws IOException{
 BufferedReader br=new BefferedReader(new InputStreamReader(System.in));
     String input=br.readLine();
     for(int i=0;i<input.length();i++){
         char a=input.charAt(i);
         if(Charracter.isUpperCase(a)){
           System.out.print(Character.toLowerCase(a));
         }else{
               System.out.print(Character.toUpperCase(a));
         }
     }
     System.out.print("\n");
 }
}

Compiler output:
Main.java:4: error: cannot find symbol
 BufferedReader br=new BefferedReader(new InputStreamReader(System.in));
                       ^
  symbol:   class BefferedReader
  location: class Main
Main.java:8: error: cannot find symbol
         if(Charracter.isUpperCase(a)){
            ^
  symbol:   variable Charracter
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
import java.util.Arrays;

class Main{
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		String s = scanner.nextLine();
		char[] c = s.toCharArray();

		for(int i = 0; i < c.length; i++){
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else if(Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
			}else{
				c[i] = c[i];
			}
		}

		Syste.out.println(c);
		
	}
}

Compiler output:
Main.java:20: error: package Syste does not exist
		Syste.out.println(c);
		     ^
1 error
Language: Java

import java.util.*;
import java.io.*;

public class Main{
  public static void main(String[] args)throws IOException{
  
  BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                    String str = br.readLine();
                    String[] strs = new String[str.length()];                    
                    
                    for(int i=0;i<str.length();i++){
                        strs[i] = String.valueOf(str.charAt(i));
                        if(strs[i].toUpperCase().equals(strs[i])){
                            strs[i] = strs[i].toLowerCase();
                        }else if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        }
                    }
                    
                    for(int i=0;i<strs.length;i++){
                        System.out.print(strs[i]);
                    }
                    System.out.print("\n")
  }

Compiler output:
Main.java:23: error: ';' expected
                    System.out.print("\n")
                                          ^
Main.java:24: error: reached end of file while parsing
  }
   ^
2 errors
Language: Java

ublic class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        String[] strs = new String[str.length()];                    
                    
                    for(int i=0;i<str.length();i++){
                        strs[i] = String.valueOf(str.charAt(i));
                        if(strs[i].toUpperCase().equals(strs[i])){
                            strs[i] = strs[i].toLowerCase();
                        }else if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        }
                    }
                    
                    StringBuilder sb = new StringBuilder();
                    for(int i=0;i<strs.length;i++){
                        //System.out.print(strs[i]);
                        sb.append(strs[i]);
                    }
                    System.out.println(sb.toString());
  }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
ublic class Main{
^
1 error