criyle/codenet-compile-errors huggingface dataset:
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();
        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: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.io.*;

public class Main {
  public static void main(String[] args) {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    try {
      char[] str = reader.readLine().toCharArray();

      for (int i = 0; i < str.length; i++) {
        if (Character.isUpperCase(str[i])) {
          System.out.print(Character.toLowerCase(str[i]));
        }
        else if (Character.isLowerCase(str[i])) {
          System.out.print(Character.toUpperCase(str[i]));
        }
        else {
          System.out.print(str[i]);
        }
      }
    }
    System.out.println();
    catch (IOException e) {
      System.out.println(e);
    }
  }
}

Compiler output:
Main.java:6: error: 'try' without 'catch', 'finally' or resource declarations
    try {
    ^
Main.java:22: error: 'catch' without 'try'
    catch (IOException e) {
    ^
2 errors
Language: Java

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

public class ITP1_8_A {

	public static void main(String[] args)throws IOException 
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		sb.append(br.readLine());
		
		for(int i=0; i<sb.length(); i++)
		{
			char chk = sb.charAt(i);
			if(Character.isUpperCase(chk))
			{
				chk = Character.toLowerCase(chk);
				sb.setCharAt(i, chk);
			}
			else if(Character.isLowerCase(chk))
			{
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			}
		}
		
	        System.out.println(sb.toString());
	}
}

Compiler output:
Main.java:5: 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.io.*;

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


Compiler output:
Main.java:12: error: ';' expected
                c[i] = Character.toUpperCase(str.charAt(i))
                                                           ^
1 error
Language: Java

import java.util.*;
public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
    	int i, j;
    	
    	String moji = sc.nextLine();
    	
    	for(char c : moji.toCharArray()) {
    		if('A' <= c && 'Z' >= c) {
    			System.out.print(Character.toLowerCase(c));
    		}
    		else if('a' <= c && 'z' >= c) {
    			System.out.print(Character.toUpperCase(c));
    		}
    		else {
    			System.out.print(c);
    		}
    	}
    	System.out.println();
    }



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

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


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.io.BufferedReader;
^
Main.java:2: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:3: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
Main.java:4: error: class, interface, enum, or record expected
import java.util.Scanner;
^
4 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
public class Main {
 
    public static final int BIG_NUM  = 2000000000;
    public static final int MOD  = 1000000007;
 
    public static void main(String[] args) {
 
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char ch;
 
 
        try {
 
            String inputed = br.readLine();
 
            for(int i = 0; i < inputed.length(); i++){
                ch = inputed.charAt(i);
 
                if(ch >= 'a' && ch <= 'z'){
                    System.out.print((char)(ch-32));
                }else if(ch >= 'A' && ch <= 'Z'){
                    System.out.print((char)(ch+32));
                }else{
                    System.out.print((char)ch);
                }
            }
            System.out.printf("\n");
 
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
Compile Error Logs:

ステータス
Judge: 4/4 	JAVA 	CPU: 00:07 sec 	Memory: 25308 KB 	Length: 749 B 	2018-01-25 21:10
テストケースの判定結果
Case # 	Verdict 	CPU Time 	Memory 	In 	Out 	Case Name
Case #1	: Accepted	00:03	24116	34	34	testcase_00
Case #2	: Accepted	00:03	24484	2	2	testcase_01
Case #3	: Accepted	00:03	24324	27	27	testcase_02
Case #4	: Accepted	00:07	25308	1149	1149	testcase_03
< prev | 		/ 		| next > 	  		
 
Judge Input #  ( | ) 		Judge Output #  ( | )

		




Compiler output:
Main.java:38: error: class, interface, enum, or record expected
Compile Error Logs:
^
Main.java:43: error: illegal character: '#'
Case # 	Verdict 	CPU Time 	Memory 	In 	Out 	Case Name
     ^
Main.java:44: error: illegal character: '#'
Case #1	: Accepted	00:03	24116	34	34	testcase_00
     ^
Main.java:45: error: illegal character: '#'
Case #2	: Accepted	00:03	24484	2	2	testcase_01
     ^
Main.java:46: error: illegal character: '#'
Case #3	: Accepted	00:03	24324	27	27	testcase_02
     ^
Main.java:47: error: illegal character: '#'
Case #4	: Accepted	00:07	25308	1149	1149	testcase_03
     ^
Main.java:50: error: illegal character: '#'
Judge Input #  ( | ) 		Judge Output #  ( | )
            ^
Main.java:50: error: illegal character: '#'
Judge Input #  ( | ) 		Judge Output #  ( | )
                     		             ^
8 errors
Language: Java

import java.util.*;

public class Main{      
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();
        char[] chars = str.toCharArray();
        for (int i=0;i<str.length();i++) {
            if('a'<=c,c<='z')
                chars[i]= Character.toUpperCase(c);
            else if('A'<=c,c<='Z')
                chars[i]= Character.toLowerCase(c);
        }
        String str2 = chars.toString();
        System.out.println(str2);
    }
}



Compiler output:
Main.java:11: error: ')' expected
            if('a'<=c,c<='z')
                     ^
Main.java:11: error: not a statement
            if('a'<=c,c<='z')
                       ^
Main.java:11: error: ';' expected
            if('a'<=c,c<='z')
                            ^
Main.java:13: error: ')' expected
            else if('A'<=c,c<='Z')
                          ^
Main.java:13: error: 'else' without 'if'
            else if('A'<=c,c<='Z')
            ^
Main.java:13: error: not a statement
            else if('A'<=c,c<='Z')
                            ^
Main.java:13: error: ';' expected
            else if('A'<=c,c<='Z')
                                 ^
7 errors
Language: Java

import java.util.*;

public class Main{      
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();
        char[] chars = str.toCharArray();
        for (int i=0;i<str.length();i++) {
            if('a'<=c&&c<='z')
                chars[i]= Character.toUpperCase(c);
            else if('A'<=c&&c<='Z')
                chars[i]= Character.toLowerCase(c);
        }
        String str2 = chars.toString();
        System.out.println(str2);
    }
}



Compiler output:
Main.java:11: error: cannot find symbol
            if('a'<=c&&c<='z')
                    ^
  symbol:   variable c
  location: class Main
Main.java:11: error: cannot find symbol
            if('a'<=c&&c<='z')
                       ^
  symbol:   variable c
  location: class Main
Main.java:12: error: cannot find symbol
                chars[i]= Character.toUpperCase(c);
                                                ^
  symbol:   variable c
  location: class Main
Main.java:13: error: cannot find symbol
            else if('A'<=c&&c<='Z')
                         ^
  symbol:   variable c
  location: class Main
Main.java:13: error: cannot find symbol
            else if('A'<=c&&c<='Z')
                            ^
  symbol:   variable c
  location: class Main
Main.java:14: error: cannot find symbol
                chars[i]= Character.toLowerCase(c);
                                                ^
  symbol:   variable c
  location: class Main
6 errors
Language: Java

import java.util.*;

public class Main{      
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();
        char[] chars = str.toCharArray();
        for (int i=0;i<str.length();i++) {
            if('a'<=chars[i]&&chars[i]<='z')
                chars[i]= Character.toUpperCase(c);
            else if('A'<=chars[i]&&chars[i]<='Z')
                chars[i]= Character.toLowerCase(c);
        }
        String str2 = chars.toString();
        System.out.println(str2);
    }
}



Compiler output:
Main.java:12: error: cannot find symbol
                chars[i]= Character.toUpperCase(c);
                                                ^
  symbol:   variable c
  location: class Main
Main.java:14: error: cannot find symbol
                chars[i]= Character.toLowerCase(c);
                                                ^
  symbol:   variable c
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

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


Compiler output:
Main.java:11: error: char cannot be dereferenced
				if(ch.isLowerCase){
				     ^
Main.java:12: error: char cannot be dereferenced
					answer += ch.toUpperCase();
					            ^
Main.java:14: error: char cannot be dereferenced
					answer += ch.toLowerCase();
					            ^
3 errors
Language: Java

import java.util.Scanner;
public class Main2{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int i;
        String line=sc.nextLine();
        String answer="";
        int length=line.length();
        for(i=0;i<length;i++){
            char ch =line.charAt(i);
            if(Character.isLowerCase(ch)==true){
                answer+=Character.toUpperCase(ch);
            }else{
                answer+=Character.toLowerCase(ch);
            }
        }
        System.out.println(answer);
    }
}


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


import java.util.Scanner;

public class TogginglingCases {
    public static void main(String[] args){
        try(Scanner sc = new Scanner(System.in)){
            String line = sc.nextLine();
            String answer = "";
            int length = line.length();
            for (int i=0; i< length; i++){
                char ch = line.charAt(i);
                if(Character.isLowerCase(ch)){
                    Character.toUpperCase(ch);
                }else{
                    Character.toLowerCase(ch);
                }

            }
        }
    }
}



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


import java.util.Scanner;

public class Mian {
    public static void main(String[] args){
        try(Scanner sc = new Scanner(System.in)){
            String line = sc.nextLine();
            String answer = "";
            int length = line.length();
            for (int i=0; i< length; i++){
                char ch = line.charAt(i);
                if(Character.isLowerCase(ch)){
                    Character.toUpperCase(ch);
                }else{
                    Character.toLowerCase(ch);
                }

            }
        }
    }
}



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

import java.util.Scanner;

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


Compiler output:
Main.java:19: error: illegal character: '\'
        System.out.print(\n);
                         ^
Main.java:19: error: not a statement
        System.out.print(\n);
                          ^
Main.java:19: error: ';' expected
        System.out.print(\n);
                           ^
3 errors
Language: Java

import java.util.Scanner;
import java.util.stream.StreamSupport;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while(sc.hasNext()){
            int i=0;
            String word = sc.nextLine();
            String result = "";
            for(i=0; i<word.length(); i++){
                char ch = word.charAt(i);
                if (Character.isLowerCase(ch)){
                    ch = Character.toUpperCase(ch);
                }
                else if (Character.isUpperCase(ch)){
                    ch = Character.toLowerCase(ch);
                }

                result += ch;
            }

            System.out.println(result);

        }
    }
}
import java.util.Scanner;
import java.util.stream.StreamSupport;

public class Test21 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while(sc.hasNext()){
            int i=0;
            String word = sc.nextLine();
            String result = "";
            for(i=0; i<word.length(); i++){
                char ch = word.charAt(i);
                if (Character.isLowerCase(ch)){
                    ch = Character.toUpperCase(ch);
                }
                else if (Character.isUpperCase(ch)){
                    ch = Character.toLowerCase(ch);
                }

                result += ch;
            }

            System.out.println(result);

        }
    }
}



Compiler output:
Main.java:29: error: class, interface, enum, or record expected
import java.util.Scanner;
^
Main.java:30: error: class, interface, enum, or record expected
import java.util.stream.StreamSupport;
^
2 errors
Language: Java

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



Compiler output:
Main.java:3: error: cannot find symbol
        try(Scanner sc = new Scanner(System.in)){
            ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        try(Scanner sc = new Scanner(System.in)){
                             ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

package TogglingCases;

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



Compiler output:
Main.java:11: error: ')' expected
                if(Character, isLowerCase(ch)){
                            ^
Main.java:11: error: ';' expected
                if(Character, isLowerCase(ch)){
                                             ^
Main.java:13: error: 'else' without 'if'
                } else {
                  ^
3 errors
Language: Java

package TogglingCases;

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



Compiler output:
Main.java:5: error: cannot find symbol
        try (Scanner sc = new Scanner  (System.in)){
             ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
        try (Scanner sc = new Scanner  (System.in)){
                              ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

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



Compiler output:
Main.java:3: error: cannot find symbol
        try (Scanner sc = new Scanner  (System.in)){
             ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        try (Scanner sc = new Scanner  (System.in)){
                              ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

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

public class j8A {

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

	}

}

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

import java.util.*;
class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		
		for (int i = 0; i < str.length(); i++){
			if (isUpperCase(str.charAt(i))){
				System.out.print(toLowerCase(str.charAt(i)));
			} else {
				System.out.print(toUpperCase(str.charAt(i)));
			}
		}
		System.out.println("");
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
			if (isUpperCase(str.charAt(i))){
			    ^
  symbol:   method isUpperCase(char)
  location: class Main
Main.java:9: error: cannot find symbol
				System.out.print(toLowerCase(str.charAt(i)));
				                 ^
  symbol:   method toLowerCase(char)
  location: class Main
Main.java:11: error: cannot find symbol
				System.out.print(toUpperCase(str.charAt(i)));
				                 ^
  symbol:   method toUpperCase(char)
  location: class Main
3 errors
Language: C

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

int main()
{
	char buf[1250];
	char *p, c;

	gets(buf);
	p = buf;
	while (*p) {
		c = *p++;
		if (isupper(c)) c = tolower(c);
		else if (islower(c)) c = toupper(c);
		putchar(c);
	}
	putchar('\n');
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   10 |         gets(buf);
      |         ^~~~
      |         fgets
Language: C

#include <stdio.h>
int main()
{
	char buf[1250];
	char *p, c;

	gets(buf);
	p = buf;
	while (*p) {
		c = *p++;
		if (isupper(c)) c = tolower(c);
		else if (islower(c)) c = toupper(c);
		putchar(c);
	}
	putchar('\n');
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 |         gets(buf);
      |         ^~~~
      |         fgets
main.c:11:21: error: implicit declaration of function 'isupper' [-Wimplicit-function-declaration]
   11 |                 if (isupper(c)) c = tolower(c);
      |                     ^~~~~~~
main.c:2:1: note: include '<ctype.h>' or provide a declaration of 'isupper'
    1 | #include <stdio.h>
  +++ |+#include <ctype.h>
    2 | int main()
main.c:11:37: error: implicit declaration of function 'tolower' [-Wimplicit-function-declaration]
   11 |                 if (isupper(c)) c = tolower(c);
      |                                     ^~~~~~~
main.c:11:37: note: include '<ctype.h>' or provide a declaration of 'tolower'
main.c:12:26: error: implicit declaration of function 'islower' [-Wimplicit-function-declaration]
   12 |                 else if (islower(c)) c = toupper(c);
      |                          ^~~~~~~
main.c:12:26: note: include '<ctype.h>' or provide a declaration of 'islower'
main.c:12:42: error: implicit declaration of function 'toupper' [-Wimplicit-function-declaration]
   12 |                 else if (islower(c)) c = toupper(c);
      |                                          ^~~~~~~
main.c:12:42: note: include '<ctype.h>' or provide a declaration of 'toupper'
Language: C

#include <stdio.h>


int main()
{
	char buf[1250];
	char *p, c;

	gets(buf);
	p = buf;
	while (*p) {
		c = *p++;
		if (isupper(c)) c = tolower(c);
		else if (islower(c)) c = toupper(c);
		putchar(c);
	}
	putchar('\n');
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    9 |         gets(buf);
      |         ^~~~
      |         fgets
main.c:13:21: error: implicit declaration of function 'isupper' [-Wimplicit-function-declaration]
   13 |                 if (isupper(c)) c = tolower(c);
      |                     ^~~~~~~
main.c:2:1: note: include '<ctype.h>' or provide a declaration of 'isupper'
    1 | #include <stdio.h>
  +++ |+#include <ctype.h>
    2 | 
main.c:13:37: error: implicit declaration of function 'tolower' [-Wimplicit-function-declaration]
   13 |                 if (isupper(c)) c = tolower(c);
      |                                     ^~~~~~~
main.c:13:37: note: include '<ctype.h>' or provide a declaration of 'tolower'
main.c:14:26: error: implicit declaration of function 'islower' [-Wimplicit-function-declaration]
   14 |                 else if (islower(c)) c = toupper(c);
      |                          ^~~~~~~
main.c:14:26: note: include '<ctype.h>' or provide a declaration of 'islower'
main.c:14:42: error: implicit declaration of function 'toupper' [-Wimplicit-function-declaration]
   14 |                 else if (islower(c)) c = toupper(c);
      |                                          ^~~~~~~
main.c:14:42: note: include '<ctype.h>' or provide a declaration of 'toupper'
Language: C

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

int main(void) {
	char str[1200];
	int i;
	
	gets(str);
	
	i = 0;
	while (str[i] != '\0') {
		if (islower(str[i])) putchar(toupper(str[i]));
		else if (isupper(str[i])) putchar(tolower(str[i]));
		else putchar(str[i]);
		i++;
	}
	puts("");
	
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |         gets(str);
      |         ^~~~
      |         fgets
Language: C

#include <stdio.h>
int main(){
	int i;
	char c[1201];
	gets(c);
	for (i=0;i<1201;i++){
		if (c[i]>='a'&&c[i]<='z')
			c[i]=c[i]-32;
		else if (c[i]>='A'&&c[i]<='Z')
			c[i]=c[i]+32;
	}
	printf("%s\n",c);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    5 |         gets(c);
      |         ^~~~
      |         fgets
Language: C

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

int main()
{
 char c;
 for(i=0;;i++){
  scanf("%c",c);
  if(isupper(c))tolower(c);
  if(islower(c))toupper(c);
  printf("%c",c);
  if(!isalpha(c))break;
               }
  printf(", ");             


for(i=0;;i++){
  scanf("%c",c);
  if(isupper(c))tolower(c);
  if(islower(c))toupper(c);
  printf("%c",c);
 if(!isalpha(c))break;
               }

  printf(", ");             


for(i=0;;i++){
  scanf("%c",c);
  if(isupper(c))tolower(c);
  if(islower(c))toupper(c);
  printf("%c",c);
 if(!isalpha(c))break;
               }

  printf(" ");             

for(i=0;;i++){
  scanf("%c",c);
  if(isupper(c))tolower(c);
  if(islower(c))toupper(c);
  printf("%c",c);
 if(!isalpha(c))break;
               }

  printf(".\n");             

return 0;
}









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

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

int main()
{
 char c;
 for(;;){
         scanf("%c",c);
         if(c=='\n'){printf("\n");
                     break;
                     }if{(isupper(c)!==0){printf("%c",tolower);
                     }if{(islower(c)!==0){printf("%c",toupper);
                     }else{printf("%c",c);
}
 return 0;
}









Compiler output:
main.c: In function 'main':
main.c:11:25: error: expected '(' before '{' token
   11 |                      }if{(isupper(c)!==0){printf("%c",tolower);
      |                         ^
      |                         (
main.c:11:39: error: expected expression before '=' token
   11 |                      }if{(isupper(c)!==0){printf("%c",tolower);
      |                                       ^
main.c:16:1: error: expected declaration or statement at end of input
   16 | }
      | ^
main.c:16:1: error: expected declaration or statement at end of input
main.c:16:1: error: expected declaration or statement at end of input
Language: C

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

int main()
{
 char c;
 for(;;){
         scanf("%c",c);
         if(c=='\n'){printf("\n");
                     break;
                     }if{(isupper(c)!==0){printf("%c",tolower(c));
                     }if{(islower(c)!==0){printf("%c",toupper(c));
                     }else{printf("%c",c);
                           }
 return 0;
}









Compiler output:
main.c: In function 'main':
main.c:11:25: error: expected '(' before '{' token
   11 |                      }if{(isupper(c)!==0){printf("%c",tolower(c));
      |                         ^
      |                         (
main.c:11:39: error: expected expression before '=' token
   11 |                      }if{(isupper(c)!==0){printf("%c",tolower(c));
      |                                       ^
main.c:16:1: error: expected declaration or statement at end of input
   16 | }
      | ^
main.c:16:1: error: expected declaration or statement at end of input
main.c:16:1: error: expected declaration or statement at end of input
Language: C

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

int main()
{
 char c;
 for(;;){
         scanf("%c",c);
         if(c=='\n'){printf("\n");
                     break;
                     }if{(isupper(c)!==0){printf("%c",tolower(c));
                     }if{(islower(c)!==0){printf("%c",toupper(c));
                     }else{printf("%c",c);
                           }
         }
 return 0;
}









Compiler output:
main.c: In function 'main':
main.c:11:25: error: expected '(' before '{' token
   11 |                      }if{(isupper(c)!==0){printf("%c",tolower(c));
      |                         ^
      |                         (
main.c:11:39: error: expected expression before '=' token
   11 |                      }if{(isupper(c)!==0){printf("%c",tolower(c));
      |                                       ^
main.c:17:1: error: expected declaration or statement at end of input
   17 | }
      | ^
main.c:17:1: error: expected declaration or statement at end of input
Language: C

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

int main()
{
 char c;
 for(;;){
         scanf("%c",c);
         if(c=='\n'){printf("\n");
                     break;
                     }if{(isupper(c)!==0){printf("%c",tolower(c));
                         }else if{(islower(c)!==0){printf("%c",toupper(c));
                                  }else{printf("%c",c);
                                        }
         }

 return 0;
}









Compiler output:
main.c: In function 'main':
main.c:11:25: error: expected '(' before '{' token
   11 |                      }if{(isupper(c)!==0){printf("%c",tolower(c));
      |                         ^
      |                         (
main.c:11:39: error: expected expression before '=' token
   11 |                      }if{(isupper(c)!==0){printf("%c",tolower(c));
      |                                       ^
main.c:18:1: error: expected declaration or statement at end of input
   18 | }
      | ^
main.c:18:1: error: expected declaration or statement at end of input
Language: C

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

int main()
{
 char c;
 for(;;){
         scanf("%c",c);
         if(c=='\n'){printf("\n");
                     break;
                     else if(isupper(c)!==0)printf("%c",tolower(c));
                     else if(islower(c)!==0)printf("%c",toupper(c));
                     else printf("%c",c);
                     }
         }

 return 0;
}









Compiler output:
main.c: In function 'main':
main.c:11:22: error: expected '}' before 'else'
   11 |                      else if(isupper(c)!==0)printf("%c",tolower(c));
      |                      ^~~~
main.c:11:42: error: expected expression before '=' token
   11 |                      else if(isupper(c)!==0)printf("%c",tolower(c));
      |                                          ^
main.c:12:42: error: expected expression before '=' token
   12 |                      else if(islower(c)!==0)printf("%c",toupper(c));
      |                                          ^
main.c: At top level:
main.c:17:2: error: expected identifier or '(' before 'return'
   17 |  return 0;
      |  ^~~~~~
main.c:18:1: error: expected identifier or '(' before '}' token
   18 | }
      | ^
Language: C

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

int main()
{
 char c;
 for(;;){
         scanf("%c",c);
         if(c=='\n'){printf("\n");
                     break;
                     }
                     else if(isupper(c)!==0)printf("%c",tolower(c));
                     else if(islower(c)!==0)printf("%c",toupper(c));
                     else printf("%c",c);
                     
         }

 return 0;
}









Compiler output:
main.c: In function 'main':
main.c:12:42: error: expected expression before '=' token
   12 |                      else if(isupper(c)!==0)printf("%c",tolower(c));
      |                                          ^
main.c:13:42: error: expected expression before '=' token
   13 |                      else if(islower(c)!==0)printf("%c",toupper(c));
      |                                          ^
Language: C

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

int main()
{
 char c;
 for(;;){
         scanf("%c",&c);
         if(c=='\n'){printf("\n");
                     break;
                     }
                     else if(islower(c)!=0)printf("%c",toupper(c));
                     else if(isupper(c)!=0)printf("%c",tolower(c));
                     else printf("%c",c);
                     
         }




Compiler output:
main.c: In function 'main':
main.c:16:10: error: expected declaration or statement at end of input
   16 |          }
      |          ^
Language: C

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

int main()
{
	char str[1200];
	gets(str);
	for(int i = 0; str[i]; ++i)
	{
		if(islower(str[i]))
		{
			str[i] = toupper(str[i]);
		}
		else if(isupper(str[i]))
		{
			str[i] = tolower(str[i]);
		}
	}
	printf("%s\n", str);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 |         gets(str);
      |         ^~~~
      |         fgets
Language: C

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

int main()
{
	char c[1200];
	int i,n;
	n=0;
	char a[1200];
	
	while(1){
	scanf("%c",&a[n]);
		if(a[n] == '/n'){
			break;
		}
		ch[n] = a[n];
		
	if('A' <= a[n] && a[n] <= 'Z') {
      ch[n] = a[n] + 32;
    } else if(a[n] >= 'a' && a[n] <= 'z') {
      ch[n] = a[n] - 32;
  
    }
      
      
    n = n +1;
      
  }
    
  for(i=0; i<n ; i++) {
    printf("%c" ,ch[i]);
  }
  printf("\n"); 
  return 0;
    
}


Compiler output:
main.c: In function 'main':
main.c:13:28: warning: multi-character character constant [-Wmultichar]
   13 |                 if(a[n] == '/n'){
      |                            ^~~~
main.c:16:17: error: 'ch' undeclared (first use in this function); did you mean 'c'?
   16 |                 ch[n] = a[n];
      |                 ^~
      |                 c
main.c:16:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main()
{
	char c[1200];
	int i,n;
	n=0;
	char a[1200];
	
	while(1){
	scanf("%c",&a[n]);
		if(a[n] == '/n'){
			break;
		}
		c[n] = a[n];
		
	if('A' <= a[n] && a[n] <= 'Z') {
      c[n] = a[n] + 32;
    } else if(a[n] >= 'a' && a[n] <= 'z') {
      h[n] = a[n] - 32;
  
    }
      
      
    n++;
      
  }
    
  for(i=0; i<n ; i++) {
    printf("%c" ,c[i]);
  }
  printf("\n"); 
  return 0;
    
}


Compiler output:
main.c: In function 'main':
main.c:13:28: warning: multi-character character constant [-Wmultichar]
   13 |                 if(a[n] == '/n'){
      |                            ^~~~
main.c:21:7: error: 'h' undeclared (first use in this function)
   21 |       h[n] = a[n] - 32;
      |       ^
main.c:21:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
 
int main(void)
{
    int count=0,n=0;
    char a[5000],b[5000];
    gets(a);
 
 
 
    for(n=0;n<5000;n++)
    {
        if(count>=5)
        {
            b[n-5]='\0';
        }
         
        if(a[n]>='A'&&a[n]<='Z')
        {
            b[n]=a[n]+32;
            count=0;
        }
         
        else if(a[n]>='a'&&a[n]<='z')
        {
            b[n]=a[n]-32;
            count=0;
        }
     
        else if(a[n]==',')
        {
            b[n]=',';
        }
        else if(a[n]==' ')
        {
            b[n]=' ';
            count++;
        }
        else if(a[n]=='.')
        {
            b[n]='.';
        }
 
        else
        {
            b[n]=a[n];
        }
         
    }
    puts(b);
return 0;
 
 
}





Compiler output:
main.c: In function 'main':
main.c:7:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 |     gets(a);
      |     ^~~~
      |     fgets
Language: C

#include <stdio.h>
int main(void)
{
  int n = 0;  
  char character[2400];

  scanf("%s",character);

  while(character[n] != \0)
 {
    printf("%c",character[n]+32);
 }

  return 0;
 
}



Compiler output:
main.c: In function 'main':
main.c:9:25: error: stray '\' in program
    9 |   while(character[n] != \0)
      |                         ^
Language: C

#include<stdio.h>

#define MAX_LENGTH (1200)

int main(void)
{
        char str[MAX_LENGTH];
        int i;

        scanf("%[^\r\n]", str);

        for(i=0; i < MAX_LENGTH; i++){
                s = 0x0;

                if(str[i] == '\0') {
                        break;
                }

                if(0x5b > str[i] && str[i] > 0x40){
                        str[i] |= 0x20;
                }else if(0x7b > str[i] && str[i] > 0x60){
                        str[i] &= 0x5f;
                }else{
                        str[i];
                }
        }

                printf("%s\n", str);

        return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:17: error: 's' undeclared (first use in this function)
   13 |                 s = 0x0;
      |                 ^
main.c:13:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main() {
	char str[1200];
	int i, l;
	gets(str);
	l = strlen(str);
	for (i = 0; i < l; ++i)
	{
		if (isupper(str[i])) str[i] = tolower(str[i]);
		else if (islower(str[i])) str[i] = toupper(str[i]);
	}
	puts(str);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |         gets(str);
      |         ^~~~
      |         fgets
Language: C

#include<stdio.h>

main()
{
	char buf[] = scanf("%[^\n]",buf);
	
	*p = buf;
	
	while(*p != '\0'){
		if('A' <= *p && *p <= 'Z'){
			printf("%c",*p + ('a'-'A'));
		} else if('a'<=*p && *p <= 'z'){
			printf("%c",*p-('a'-'A'));
		} else {
			printf("%c",*p);
		}
		p++;
	}
	printf("\n");
	return 0;
}
	

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:5:22: error: invalid initializer
    5 |         char buf[] = scanf("%[^\n]",buf);
      |                      ^~~~~
main.c:7:10: error: 'p' undeclared (first use in this function)
    7 |         *p = buf;
      |          ^
main.c:7:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(){
 int i=0,j;
 char c;
 for(i=0; i<n; i++){
  scanf("%d", &c);
  if(C[i]=="\n"){break}
  else if(isupper(c)){printf("%c",tolower(c));}
  else if(islower(c)){printf("%c",toupper(c));}
 }
 printf("\n");
 return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:7:13: error: 'n' undeclared (first use in this function)
    7 |  for(i=0; i<n; i++){
      |             ^
main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:6: error: 'C' undeclared (first use in this function)
    9 |   if(C[i]=="\n"){break}
      |      ^
main.c:9:23: error: expected ';' before '}' token
    9 |   if(C[i]=="\n"){break}
      |                       ^
      |                       ;
Language: C

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

int main(){
 int i=0,j;
 char c;
 for(i=0; i<n; i++){
  scanf("%d", &c);
  if(C[i]=="\n"){break;}
  else if(isupper(c)){printf("%c",tolower(c));}
  else if(islower(c)){printf("%c",toupper(c));}
 }
 printf("\n");
 return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:7:13: error: 'n' undeclared (first use in this function)
    7 |  for(i=0; i<n; i++){
      |             ^
main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:6: error: 'C' undeclared (first use in this function)
    9 |   if(C[i]=="\n"){break;}
      |      ^
Language: C

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

int main(){
 int i=0,j;
 char c;
 for(i=0; i<n; i++){
  scanf("%d", &c);
  if(c=="\n"){break;}
  else if(isupper(c)){printf("%c",tolower(c));}
  else if(islower(c)){printf("%c",toupper(c));}
 }
 printf("\n");
 return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:7:13: error: 'n' undeclared (first use in this function)
    7 |  for(i=0; i<n; i++){
      |             ^
main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:7: warning: comparison between pointer and integer
    9 |   if(c=="\n"){break;}
      |       ^~
Language: C

#include<stdio.h>
#include<ctype.h>
#define MAX 1200

int main(){
 int i=0,j;
 char c[MAX];
 for(i=0; i<MAX; i++){
  gets(c);
  if(c=="\n"){break;}
  else if(isupper(c)){printf("%c",tolower(c));}
  else if(islower(c)){printf("%c",toupper(c));}
  else{printf("%c", c);}
　c++;
 }
 printf("\n");
 return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:9:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    9 |   gets(c);
      |   ^~~~
      |   fgets
main.c:11:43: error: passing argument 1 of 'tolower' makes integer from pointer without a cast [-Wint-conversion]
   11 |   else if(isupper(c)){printf("%c",tolower(c));}
      |                                           ^
      |                                           |
      |                                           char *
In file included from main.c:2:
/usr/include/ctype.h:122:25: note: expected 'int' but argument is of type 'char *'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
main.c:12:43: error: passing argument 1 of 'toupper' makes integer from pointer without a cast [-Wint-conversion]
   12 |   else if(islower(c)){printf("%c",toupper(c));}
      |                                           ^
      |                                           |
      |                                           char *
/usr/include/ctype.h:125:25: note: expected 'int' but argument is of type 'char *'
  125 | extern int toupper (int __c) __THROW;
      |                     ~~~~^~~
main.c:14:1: error: stray '\343' in program
   14 | <U+3000>c++;
      | ^~~~~~~~
main.c:14:4: error: lvalue required as increment operand
   14 | 　c++;
      |    ^~
Language: C

#include<stdio.h>
#include<ctype.h>
#define MAX 1200

int main(){
 int i=0,j;
 char c[MAX];
  gets(&c[]);
　while(1){
   if(c[i]=="\n"){break;}
   else if(isupper(c[i])){printf("%c",tolower(c[i]));}
   else if(islower(c[i])){printf("%c",toupper(c[i]));}
   else{printf("%c", c[i]);}
   i++;
  }
 printf("\n");
 return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |   gets(&c[]);
      |   ^~~~
      |   fgets
main.c:8:11: error: expected expression before ']' token
    8 |   gets(&c[]);
      |           ^
main.c:9:1: error: stray '\343' in program
    9 | <U+3000>while(1){
      | ^~~~~~~~
main.c:10:11: warning: comparison between pointer and integer
   10 |    if(c[i]=="\n"){break;}
      |           ^~
Language: C

#include<stdio.h>
#include<ctype.h>
#define MAX 1200

int main(){
 int i=0,j;
 char c[MAX];
  gets(c);
　while(1){
   if(c[i]=="\n"){break;}
   else if(isupper(c[i])){printf("%c",tolower(c[i]));}
   else if(islower(c[i])){printf("%c",toupper(c[i]));}
   else{printf("%c", c[i]);}
   i++;
  }
 printf("\n");
 return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |   gets(c);
      |   ^~~~
      |   fgets
main.c:9:1: error: stray '\343' in program
    9 | <U+3000>while(1){
      | ^~~~~~~~
main.c:10:11: warning: comparison between pointer and integer
   10 |    if(c[i]=="\n"){break;}
      |           ^~
Language: C

#include<stdio.h>
#include<ctype.h>
#define MAX 1200

int main(){
 int i=0,j;
 char c[MAX];
  gets(c);
　while(1){
   if(c[i]=="\0"){break;}
   else if(isupper(c[i])){printf("%c",tolower(c[i]));}
   else if(islower(c[i])){printf("%c",toupper(c[i]));}
   else{printf("%c", c[i]);}
   i++;
  }
 printf("\n");
 return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |   gets(c);
      |   ^~~~
      |   fgets
main.c:9:1: error: stray '\343' in program
    9 | <U+3000>while(1){
      | ^~~~~~~~
main.c:10:11: warning: comparison between pointer and integer
   10 |    if(c[i]=="\0"){break;}
      |           ^~