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

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

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

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: 'islower' was not declared in this scope
    9 |                 if(islower(ch)){
      |                    ^~~~~~~
a.cc:10:37: error: 'toupper' was not declared in this scope
   10 |                         printf("%c",toupper(ch));
      |                                     ^~~~~~~
a.cc:11:26: error: 'isupper' was not declared in this scope
   11 |                 }else if(isupper(ch)){
      |                          ^~~~~~~
a.cc:12:37: error: 'tolower' was not declared in this scope
   12 |                         printf("%c",tolower(ch));
      |                                     ^~~~~~~
Language: C++

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

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

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

#include<iostream>
using namespace std;

int main(){
 char str;

 while(1){
  cin >> str;

  if(str == "\n") break;

  if(islower(str)) 
   toupper(str);
  else if(isupper(str))
   tolower(str);
  
 }

 return 0;
}

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

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

int main(){
 char str;

 while(1){
  cin >> str;

  if(str == "\n") break;

  if(islower(str)) 
   cout << toupper(str);
  else if(isupper(str))
   cout << tolower(str);
  else
   cout << str;
 }

 return 0;
}

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

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

int main(){
 char str;

 while(1){
  //cin >> str;
  scanf("%c", &str);

  if(str == "\n") break;

  if(islower(str)) 
   //cout << toupper(str);
   printf("%c", toupper(str));
  else if(isupper(str))
   //cout << tolower(str);
   printf("%c", tolower(str));
  else
   //cout << str;
   printf("%c", str);
 }

 return 0;
}

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

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

int main(){
	char str;

	while (1){
		//cin >> str;
		scanf_s("%c", &str);

		if (str == '\n') break;

		if (islower(str))
			//cout << toupper(str);
			printf("%c", toupper(str));
		else if (isupper(str))
			//cout << tolower(str);
			printf("%c", tolower(str));
		else
			//cout << str;
			printf("%c", str);
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   11 |                 scanf_s("%c", &str);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <iostream>
#include <string>
#include <ctype.h>
using namespace std;

int main()
{
	char a[1200];
	cin >> a;
	for(int i = 0; i <= strlen(a); i++){
		if(isupper(a[i])){
			a[i] = ::tolower(a[i]);
		}
		else{
			a[i] = ::toupper(a[i]);
		}
	}
	cout << a << endl;

	return 0;
}

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

#include <iostream>
#include <string>
#include <ctype.h>
using namespace std;

int main()
{
	char a[1200];
	cin >> a;
	for(int i = 0; i <= ::strlen(a); i++){
		if(isupper(a[i])){
			a[i] = ::tolower(a[i]);
		}
		else{
			a[i] = ::toupper(a[i]);
		}
	}
	cout << a << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: '::strlen' has not been declared
   10 |         for(int i = 0; i <= ::strlen(a); i++){
      |                               ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

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

int main()
{
	char a[1200];
	cin >> a;
	for(int i = 0; i <= strlen(a); i++){
		if(isupper(a[i])){
			a[i] = ::tolower(a[i]);
		}
		else{
			a[i] = ::toupper(a[i]);
		}
	}
	cout << a << endl;

	return 0;
}

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


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

int main()
{
	char a[1200];
	cin >> a;
	for(int i = 0; i <= std::strlen(a); i++){
		if(isupper(a[i])){
			a[i] = ::tolower(a[i]);
		}
		else{
			a[i] = ::toupper(a[i]);
		}
	}
	cout << a << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:34: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'?
   10 |         for(int i = 0; i <= std::strlen(a); i++){
      |                                  ^~~~~~
      |                                  mbrlen
Language: C++

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

int main()
{
	string a;
	getline(cin, a);
	for(int i = 0; i < strlen(a.c_str()); i++){
		if(isupper(a[i])){
			a[i] = ::tolower(a[i]);
		}
		else {
			a[i] = ::toupper(a[i]);
		}
	}
	cout << a << endl;

	return 0;
}

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

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

int main()
{
	string a;
	getline(cin, a);
	for(int i = 0; i < ::strlen(a.c_str()); i++){
		if(isupper(a[i])){
			a[i] = ::tolower(a[i]);
		}
		else {
			a[i] = ::toupper(a[i]);
		}
	}
	cout << a << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: '::strlen' has not been declared
    9 |         for(int i = 0; i < ::strlen(a.c_str()); i++){
      |                              ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

#include<iostream>
using namespace std;

int main(){
	char c;
	while(1){
		scanf("%c",&c);
		if(c>='a'&&c<='z'){
			c=c-20;
			cout << c;
		}
		else if(c>='A'&&c<='Z'){
			c=c+20;
			cout << c;
		}
		else if(c!=EOF){
			cout << c;
		}
		else{return o;}
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:29: error: 'o' was not declared in this scope
   19 |                 else{return o;}
      |                             ^
Language: C++


#include <iostream>
#include <cctype>
#include <sting>
using namespace std;
int main() {
    string ch;
    while(1){
        cin >> ch;
    if ( isalpha(ch) ) {
        if (islower(ch)) {
            cout << toupper(ch);
        }
        else {
            cout << tolower(ch);
        }
    }else cout << ch;
        if(ch == endl)break;
    }
    return 0;
}

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

//$g++ main.cpp - compile
//$./a.out - run
#include <iostream>
#include <string>
#include <cctype>
using namespace std;

int main(){
    char str[1200];
    int i = 0;
    do{
        scanf("%c", &str[i]);
        if(islower(str[i])) str[i] = toupper(str[i]);
        else if(isupper(str[i])) str[i] = tolower(str[i]);
    }while(str[i++] != '\n');
    for(int j = 0; j < strlen(str); j++){
        cout << str[j];
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: 'strlen' was not declared in this scope
   16 |     for(int j = 0; j < strlen(str); j++){
      |                        ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <cctype>
  +++ |+#include <cstring>
    6 | using namespace std;
Language: C++

//$g++ main.cpp - compile
//$./a.out - run
#include <iostream>
#include <string>
#include <cctype>
#include <stdio.h>
using namespace std;

int main(){
    char str[1200];
    int i = 0;
    do{
        scanf("%c", &str[i]);
        if(islower(str[i])) str[i] = toupper(str[i]);
        else if(isupper(str[i])) str[i] = tolower(str[i]);
    }while(str[i++] != '\n');
    for(int j = 0; j < strlen(str); j++){
        cout << str[j];
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: 'strlen' was not declared in this scope
   17 |     for(int j = 0; j < strlen(str); j++){
      |                        ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <cctype>
  +++ |+#include <cstring>
    6 | #include <stdio.h>
Language: C++

#include <stdio.h>
#include <iostream>
using namespace std;
#include <stdio.h>
int main()
{
	int i, j, k = 0;
	bool flag = true;
	int i, j, k = 0;
	char abc[27] = { "abcdefghijklmnopqrstuvwxyz" }, ABC[27] = { "ABCDEFGHIJKLMNOPQRSTUVWXYZ" }, a[4] = { ",?!" }, str[2700];
	scanf("%s", str);
	for (i = 0; str[i] != '.'; i++){
		for (j = 0; j<4; j++){
			if (a[j] == str[i]){
				i++; continue;
			}
		}
		for (j = 0; j<26 && k == 0; j++){
			if (abc[j] == str[i]){
				str[i] = ABC[j];
				k++;
			} else if (ABC[j] == str[i]){
				str[i] = abc[j];
				k++;
			}
		}
		k == 0;
	}
	cout << str << endl;
	scanf("%s", str);
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: redeclaration of 'int i'
    9 |         int i, j, k = 0;
      |             ^
a.cc:7:13: note: 'int i' previously declared here
    7 |         int i, j, k = 0;
      |             ^
a.cc:9:16: error: redeclaration of 'int j'
    9 |         int i, j, k = 0;
      |                ^
a.cc:7:16: note: 'int j' previously declared here
    7 |         int i, j, k = 0;
      |                ^
a.cc:9:19: error: redeclaration of 'int k'
    9 |         int i, j, k = 0;
      |                   ^
a.cc:7:19: note: 'int k' previously declared here
    7 |         int i, j, k = 0;
      |                   ^
Language: C++

import java.util.*;
class Main {
	public static void main (String[] args) throws java.lang.Exception {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		for(int i = 0; i < s.length(); i++) {
			char c = s.charAt(i);
			if('a' <= c && c <= 'z') System.out.print((char)(c - 32));
			else if('A' <= c && c <= 'Z') System.out.print((char)(c + 32));
			else System.out.print(c);
		}
		System.out.println();
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:15: error: expected ':' before 'static'
    3 |         public static void main (String[] args) throws java.lang.Exception {
      |               ^~~~~~~
      |               :
a.cc:3:34: error: 'String' has not been declared
    3 |         public static void main (String[] args) throws java.lang.Exception {
      |                                  ^~~~~~
a.cc:3:43: error: expected ',' or '...' before 'args'
    3 |         public static void main (String[] args) throws java.lang.Exception {
      |                                           ^~~~
a.cc:3:47: error: expected ';' at end of member declaration
    3 |         public static void main (String[] args) throws java.lang.Exception {
      |                                               ^
      |                                                ;
a.cc:3:49: error: 'throws' does not name a type
    3 |         public static void main (String[] args) throws java.lang.Exception {
      |                                                 ^~~~~~
a.cc:14:2: error: expected ';' after class definition
   14 | }
      |  ^
      |  ;
Language: C++

#include <iostream>
using namespace std;
int main() {
	char c;
	while (cin >> c) {
		cout << (c = isupper(c) ? tolower(c) : toupper(c));
	cout << endl;
}

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

#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<stdio.h>

using namespace std;

int main() {	
	char input[1201] = { 0 };
	int n = 0, ascii = 0, inputlen = 0;
	scanf("%s", input);
	inputlen = strlen(input);
	for (int i = 0; i < inputlen; i++) {
		ascii = input[i];
		if (65 <= ascii&&ascii <= 90) {
			ascii += 32;
			input[i] = ascii;
		}
		else if (97 <= ascii&&ascii <= 122) {
			ascii -= 32;
			input[i] = ascii;
		}
	}
	while (input[n] != '\0') {
		printf("%c", input[n]);
		n++;
	}
	cout << endl;
	return 0;
}

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

#include <stdio.h>
#include <cctype.h> //??????????????¢??£???????????????

int main(void)
{
  int i=0;
  char str[1200];

  scanf("%s",str);

  do{
    if(isupper(str[i])){ //??????????????????????????§???????????¢????????????????????????
      str[i] = tolower(str[i]); //?°????????????????
      i++;
    }
    else if(islower(str[i])){ //?????????????????????????°????????????¢????????????????????????
      str[i] = toupper(str[i]); //??§???????????????
      i++;
    }
  }while(str[i] == '\n'); //??????????????????????????§?????¨??¨?????§??????????????\????????§???
  
  printf("%s\n",str);
  
  return(0);
}

Compiler output:
a.cc:2:10: fatal error: cctype.h: No such file or directory
    2 | #include <cctype.h> //??????????????¢??£???????????????
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
int aa[1000][1000]={};
int main()
{
    int  i=0,j=0,n=0,a=0,b=0,c=0,d=0;
    string s;
    cin >> s;
    transform(s.begin(),s.end(),s.begin(),toupper);
            cout << s << endl;
}

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

int main() {
	char s;
	while (1) {
		scanf_s("%c", &s);
		if (s == '\n')break;



		if (islower(s))s = toupper(s);
		else if (isupper(s))s = tolower(s);
		printf("%c",s);
		

		
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'scanf_s' was not declared in this scope
    4 |                 scanf_s("%c", &s);
      |                 ^~~~~~~
a.cc:9:21: error: 'islower' was not declared in this scope
    9 |                 if (islower(s))s = toupper(s);
      |                     ^~~~~~~
a.cc:9:36: error: 'toupper' was not declared in this scope
    9 |                 if (islower(s))s = toupper(s);
      |                                    ^~~~~~~
a.cc:10:26: error: 'isupper' was not declared in this scope
   10 |                 else if (isupper(s))s = tolower(s);
      |                          ^~~~~~~
a.cc:10:41: error: 'tolower' was not declared in this scope
   10 |                 else if (isupper(s))s = tolower(s);
      |                                         ^~~~~~~
a.cc:11:17: error: 'printf' was not declared in this scope
   11 |                 printf("%c",s);
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
Language: C++

int main() {
	char s;
	while (1) {
		scanf("%c", &s);
		if (s == '\n')break;



		if (islower(s))s = toupper(s);
		else if (isupper(s))s = tolower(s);
		printf("%c",s);
		

		
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'scanf' was not declared in this scope
    4 |                 scanf("%c", &s);
      |                 ^~~~~
a.cc:9:21: error: 'islower' was not declared in this scope
    9 |                 if (islower(s))s = toupper(s);
      |                     ^~~~~~~
a.cc:9:36: error: 'toupper' was not declared in this scope
    9 |                 if (islower(s))s = toupper(s);
      |                                    ^~~~~~~
a.cc:10:26: error: 'isupper' was not declared in this scope
   10 |                 else if (isupper(s))s = tolower(s);
      |                          ^~~~~~~
a.cc:10:41: error: 'tolower' was not declared in this scope
   10 |                 else if (isupper(s))s = tolower(s);
      |                                         ^~~~~~~
a.cc:11:17: error: 'printf' was not declared in this scope
   11 |                 printf("%c",s);
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
Language: C++

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



int main() {
	char s;
	while (1) {
		scanf_s("%c", &s);
		if (s == '\n')break;



		if (islower(s))s = toupper(s);
		else if (isupper(s))s = tolower(s);
		printf("%c",s);
		

		
	}
	cout << endl;

	return 0;
}




/*


#include<iostream>
#include<iomanip>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<climits>
#include<cmath>
#include<cstdio>
#include<deque>
#include<list>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespace std;

int main() {
	for (char c; (c = getchar()) != '\n';) {
		if (islower(c))
			cout << (char)toupper(c);
		else if (isupper(c))
			cout << (char)tolower(c);
		else
			cout << c;
	}
	cout << endl;
	return 0;
}





#include<iostream>
#include<iomanip>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<climits>
#include<cmath>
#include<cstdio>
#include<deque>
#include<list>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespace std;

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

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

#include <iostream>
#include <string>
#include <stddef.h>
#include <stack>
#include <queue>
#include <cctype>

using namespace std;


int main() {
	char ch;

	while (1) {
		scanf_s("%c",&ch);
		if (islower(ch)) ch = toupper(ch);
		else if (isupper(ch)) ch = tolower(ch);
		cout << ch;
		if (ch == '\n') break;
	}
	
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   15 |                 scanf_s("%c",&ch);
      |                 ^~~~~~~
      |                 scanf
Language: C++

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

int main(){
    char str[1200];
    gets(str);
    int i = 0;
    while(true){
        char uc, lc;
        uc = toupper(str[i]);
        lc = tolower(str[i]);

        else if(lc == str[i]) printf("%c, uc);
        else printf("%c", lc);

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

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

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

int main(){
    char str[1200];
    gets(str);
    int i = 0;
    while(true){
        char uc, lc;
        uc = toupper(str[i]);
        lc = tolower(str[i]);

        else if(lc == str[i]) printf("%c, uc);
        else printf("%c", lc);

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

Compiler output:
a.cc:14:38: warning: missing terminating " character
   14 |         else if(lc == str[i]) printf("%c, uc);
      |                                      ^
a.cc:14:38: error: missing terminating " character
   14 |         else if(lc == str[i]) printf("%c, uc);
      |                                      ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     gets(str);
      |     ^~~~
      |     getw
a.cc:14:9: error: 'else' without a previous 'if'
   14 |         else if(lc == str[i]) printf("%c, uc);
      |         ^~~~
a.cc:15:9: error: expected primary-expression before 'else'
   15 |         else printf("%c", lc);
      |         ^~~~
Language: C++

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

int main(){
    char str[1200];
    gets(str);
    int i = 0;
    while(true){
        char uc, lc;
        uc = toupper(str[i]);
        lc = tolower(str[i]);

        else if(lc == str[i]) printf("%c", uc);
        else printf("%c", lc);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     gets(str);
      |     ^~~~
      |     getw
a.cc:14:9: error: 'else' without a previous 'if'
   14 |         else if(lc == str[i]) printf("%c", uc);
      |         ^~~~
Language: C++

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
    5 |         scanf("%c",&ch);
      |         ^~~~~
a.cc:6:12: error: 'isalpha' was not declared in this scope
    6 |         if(isalpha(ch)!=0){
      |            ^~~~~~~
a.cc:7:16: error: 'islower' was not declared in this scope
    7 |             if(islower(ch)!=0) {printf("%c",toupper(ch));}
      |                ^~~~~~~
a.cc:7:45: error: 'toupper' was not declared in this scope
    7 |             if(islower(ch)!=0) {printf("%c",toupper(ch));}
      |                                             ^~~~~~~
a.cc:7:33: error: 'printf' was not declared in this scope
    7 |             if(islower(ch)!=0) {printf("%c",toupper(ch));}
      |                                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:8:30: error: 'tolower' was not declared in this scope
    8 |             else printf("%c",tolower(ch));
      |                              ^~~~~~~
a.cc:8:18: error: 'printf' was not declared in this scope
    8 |             else printf("%c",tolower(ch));
      |                  ^~~~~~
a.cc:8:18: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:10:14: error: 'printf' was not declared in this scope
   10 |         else printf("%c",ch);
      |              ^~~~~~
a.cc:10:14: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {

   char char_A = 'A';
   char char_Z = 'Z';
   char char_a = 'a';
   char char_z = 'z';

   string inputStr;

   while (cin >> inputStr) {

      if (!first) {
         cout << " ";
      }

      first = false;

      int m = inputStr.length();

      for (int i = 0; i < m; ++i) {

         char inChar = inputStr[i];

         if (char_A <= inChar && inChar <= char_Z) {
            inChar += char_a - char_A;
         } else if (char_a <= inChar && inChar <= char_z) {
            inChar -= char_a - char_A;
         }

         cout << inChar;

      }

   }

   cout << endl;

   return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: 'first' was not declared in this scope
   17 |       if (!first) {
      |            ^~~~~
a.cc:21:7: error: 'first' was not declared in this scope
   21 |       first = false;
      |       ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
	char ch;//ch:?????????
	
	while(1){
		cin >> ch;
		if(ch == '\n'){
			break;}
		
		if(islower(ch) != 0){ //ch????°???????????????\????°????????????????
			ch = toupper(ch); //?°????????????§??????
			cout << ch ;
			}
		}else if(isupper(ch)){ //??§???????????????????????\?????§???????????????
			ch = tolower(ch);
			cout << ch;
		}else{ //??±????????\???
			cout << ch;
		}
	cout << eendl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: 'else' without a previous 'if'
   17 |                 }else if(isupper(ch)){ //??§???????????????????????\?????§???????????????
      |                  ^~~~
a.cc:23:17: error: 'eendl' was not declared in this scope
   23 |         cout << eendl;
      |                 ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
	char ch;//ch:?????????
	
	while(1){
		cin >> ch;
		if(ch == '\n'){
			break;}
		
		if(islower(ch) != 0){ //ch????°???????????????\????°????????????????
			ch = toupper(ch); //?°????????????§??????
			cout << ch;
			}
		}else if(isupper(ch)){ //??§???????????????????????\?????§???????????????
			ch = tolower(ch);
			cout << ch;
		}else{ //??±????????\???
			cout << ch;
		}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: 'else' without a previous 'if'
   17 |                 }else if(isupper(ch)){ //??§???????????????????????\?????§???????????????
      |                  ^~~~
Language: C++

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

int main()
{
	char ch;//ch:?????????
	
	while(1){
		cin >> ch;
		if(ch == '\n'){
			break;}
		
		if(islower(ch) != 0){ //ch????°???????????????\????°????????????????
			ch = toupper(ch); //?°????????????§??????
			cout << ch;
			}
		}else if(isupper(ch) != 0){ //??§???????????????????????\?????§???????????????
			ch = tolower(ch);
			cout << ch;
		}else{ //??±????????\???
			cout << ch;
		}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: 'else' without a previous 'if'
   18 |                 }else if(isupper(ch) != 0){ //??§???????????????????????\?????§???????????????
      |                  ^~~~
Language: C++

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

int main()
{
	char x;
	
	while(1){
		cin >> x;
		
		if(x == '\n') break;
		if(isalpha){
			if(isupper(x)){
				x = tolower(x);
			}if(islower(x)) {
				x = tolower(x);
			}
		}else printf("%c",&x);
	}
	cout << " " ;
	return 0;
}
		
	

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

#include <iostream>
#include <string>


int main()
{
    bool break_key = true;
    while (break_key) {

        std::string str = "";
        std::cin >> str;
        std::string ans = str;

        for (int i = 0; i < str.length(); i++) {
            if ((char)str[i] == ',' || (char)str[i] == '.') {
            } else if (str[i] == tolower(str[i])) {
                ans[i] = toupper(str[i]);
            } else if (str[i] == toupper(str[i])) {
                ans[i] = tolower(str[i]);
            }
        }
       
        std::cout << ans;
        if ((char)ans[ans.length()-1] ==  '.') {
         std::cout << std::endl;
            break_key = false;
        } else {
          std::cout <<  " ";
    }

}

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

#include <iostream>
#include <string>


int main()
{
    bool break_key = true;
    int count= 0;
    while (break_key) {
        if (count != 0) {
            std::cout << " ";
        }
        std::string str = "";
        std::cin >> str;
        std::string ans = str;
        std::string period = ".";
        for (int i = 0; i < str.length(); i++) {

            if (str[i] == tolower(str[i])) {
                ans[i] = toupper(str[i]);
            } else if (str[i] == toupper(str[i])) {
                ans[i] = tolower(str[i]);
            }
        }

        std::cout << ans;
        if ((char)ans[ans.length()-1] ==  '.') {
            std::cout << std::endl;
            break_key = false;
    }

}

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

#include <iostream>
#include <string>


int main()
{
    bool break_key = true;
    int count= 0;
    while (break_key) {
        if (count != 0) {
            std::cout << " ";
        }
        count++;
        std::string str = "";
        std::cin >> str;
        std::string ans = str;
        std::string period = ".";
        for (int i = 0; i < str.length(); i++) {

            if (str[i] == tolower(str[i])) {
                ans[i] = toupper(str[i]);
            } else if (str[i] == toupper(str[i])) {
                ans[i] = tolower(str[i]);
            }
        }

        std::cout << ans;
        if ((char)ans[ans.length()-1] ==  '.') {
            std::cout << std::endl;
            break_key = false;
    }

}

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

int main() {
	char a[1200];
	int i,j;
	for (i = 0; i < 1200; i++) {
		a[i] = getchar();
		if (a[i] == '\n') {
			break;
		}
	}
	for (j = 0; j < i; j++) {
		if (isupper(a[j]) != 0) {
			a[j] = tolower(a[j]);
		}
		else if (islower(a[j]) != 0) {
			a[j] = toupper(a[j]);
		}
		else if (a[j] == '\n') {
			break;
		}
	}
	for (j = 0; j < i; j++) {
		cout << a[j];
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:24: error: 'getchar' was not declared in this scope
    5 |                 a[i] = getchar();
      |                        ^~~~~~~
a.cc:1:1: note: 'getchar' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
a.cc:11:21: error: 'isupper' was not declared in this scope
   11 |                 if (isupper(a[j]) != 0) {
      |                     ^~~~~~~
a.cc:12:32: error: 'tolower' was not declared in this scope
   12 |                         a[j] = tolower(a[j]);
      |                                ^~~~~~~
a.cc:14:26: error: 'islower' was not declared in this scope
   14 |                 else if (islower(a[j]) != 0) {
      |                          ^~~~~~~
a.cc:15:32: error: 'toupper' was not declared in this scope
   15 |                         a[j] = toupper(a[j]);
      |                                ^~~~~~~
a.cc:22:17: error: 'cout' was not declared in this scope
   22 |                 cout << a[j];
      |                 ^~~~
Language: C++

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

int main(void)
{
  int len,i;
  char m[1200];

  scanf("%s",m);

  len=strlen(m);

  for(i=0;i<len;i++){
    if(isupper(m[i]){
        printf("%s",tolower(m[i]));
      }
      
    else if(islower(m[i]){
        printf("%s",toupper(m[i]));
      }
   }
      
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: expected ')' before '{' token
   15 |     if(isupper(m[i]){
      |       ~             ^
      |                     )
a.cc:22:4: error: expected primary-expression before '}' token
   22 |    }
      |    ^
Language: C++

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

int main()
{
  string s;
  getline(cin,s);
  for(int i=0;i<s.length();i++)
    {
      if('a'<=s[i]&&s[i]<='z')
	{
	  s[i]=(char)(s[i]+'A'-'a');
	}
      else if('A'<=s[i]&&s[i]<='Z')
	{
	  s[i]=(char)(s[i]+'a'-'A');
	}
    }

  cout << s << endl;

retrun 0;
}

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

#include<iostream>
#include<cctype>

using namespace std;

int main(){
	char ch;
	
	while(1){
		cin >> ch; 
		if (ch == " ") break;
		cout << toupper(ch);
	}

	return 0;
}

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

#include<iostream>
#include<cctype>

using namespace std;

int main(){
	char ch;
	
	while(1){
		cin >> ch; 
		if (ch == endl) break;
		cout << toupper(ch);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator=='
   11 |                 if (ch == endl) break;
      |                     ~~~^~~~~~~
Language: C++

#include<iostream>
#include<cctype>

using namespace std;

int main(){
	int fin;
	char ch[1200];
	
	for(int i = 0; i < 1200, i++){
		cin >> ch;
		if (ch = ""){ 
			fin = i;
			break;
		}
		else ch[i] = ch;
	}
	
	for(int i = 0; i < fin, i++){
		if( islower(ch[i]) ) 
			cout << toupper(ch[i]);
		else if ( isupper(ch[i]) ) 
			cout << tolower(ch[i]);
		else 
			cout << ch[i];
	}
	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:37: error: expected ';' before ')' token
   10 |         for(int i = 0; i < 1200, i++){
      |                                     ^
      |                                     ;
a.cc:12:24: error: incompatible types in assignment of 'const char [1]' to 'char [1200]'
   12 |                 if (ch = ""){
      |                     ~~~^~~~
a.cc:16:30: error: invalid conversion from 'char*' to 'char' [-fpermissive]
   16 |                 else ch[i] = ch;
      |                              ^~
      |                              |
      |                              char*
a.cc:19:36: error: expected ';' before ')' token
   19 |         for(int i = 0; i < fin, i++){
      |                                    ^
      |                                    ;
Language: C++

#include<iostream>
#include<cctype>

using namespace std;

int main(){
	int fin;
	char ch[1200];
	
	for(int i = 0; i < 1200; i++){
		cin >> ch;
		if (ch = ""){ 
			fin = i;
			break;
		}
		else ch[i] = ch;
	}
	
	for(int i = 0; i < fin; i++){
		if( islower(ch[i]) ) 
			cout << toupper(ch[i]);
		else if ( isupper(ch[i]) ) 
			cout << tolower(ch[i]);
		else 
			cout << ch[i];
	}
	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: incompatible types in assignment of 'const char [1]' to 'char [1200]'
   12 |                 if (ch = ""){
      |                     ~~~^~~~
a.cc:16:30: error: invalid conversion from 'char*' to 'char' [-fpermissive]
   16 |                 else ch[i] = ch;
      |                              ^~
      |                              |
      |                              char*
Language: C++

#include<iostream>
#include<cctype>

using namespace std;

int main(){
	int fin;
	char ch;
	char ch[1200];
	
	for(int i = 0; i < 1200; i++){
		cin >> ch;
		if (ch = ""){ 
			fin = i;
			break;
		}
		else ch[i] = ch;
	}
	
	for(int i = 0; i < fin; i++){
		if( islower(ch[i]) ) 
			cout << toupper(ch[i]);
		else if ( isupper(ch[i]) ) 
			cout << tolower(ch[i]);
		else 
			cout << ch[i];
	}
	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: conflicting declaration 'char ch [1200]'
    9 |         char ch[1200];
      |              ^~
a.cc:8:14: note: previous declaration as 'char ch'
    8 |         char ch;
      |              ^~
a.cc:13:26: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   13 |                 if (ch = ""){
      |                          ^~
      |                          |
      |                          const char*
a.cc:17:24: error: invalid types 'char[int]' for array subscript
   17 |                 else ch[i] = ch;
      |                        ^
a.cc:21:31: error: invalid types 'char[int]' for array subscript
   21 |                 if( islower(ch[i]) )
      |                               ^
a.cc:22:43: error: invalid types 'char[int]' for array subscript
   22 |                         cout << toupper(ch[i]);
      |                                           ^
a.cc:23:37: error: invalid types 'char[int]' for array subscript
   23 |                 else if ( isupper(ch[i]) )
      |                                     ^
a.cc:24:43: error: invalid types 'char[int]' for array subscript
   24 |                         cout << tolower(ch[i]);
      |                                           ^
a.cc:26:35: error: invalid types 'char[int]' for array subscript
   26 |                         cout << ch[i];
      |                                   ^
Language: C++

#include<iostream>
#include<cctype>

using namespace std;

int main(){
	int fin;
	char wd,ch[1200];
	
	for(int i = 0; i < 1200; i++){
		cin >> wd;
		if (wd = ""){ 
			fin = i;
			break;
		}
		else ch[i] = wd;
	}
	
	for(int i = 0; i < fin; i++){
		if( islower(ch[i]) ) 
			cout << toupper(ch[i]);
		else if ( isupper(ch[i]) ) 
			cout << tolower(ch[i]);
		else 
			cout << ch[i];
	}
	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   12 |                 if (wd = ""){
      |                          ^~
      |                          |
      |                          const char*
Language: C++

#include<iostream>
#include<cctype>

using namespace std;

int main(){
	int fin;
	char wd,ch[1200];
	
	for(int i = 0; i < 1200; i++){
		cin >> wd;
		if (wd = " "){ 
			fin = i;
			break;
		}
		else ch[i] = wd;
	}
	
	for(int i = 0; i < fin; i++){
		if( islower(ch[i]) ) 
			cout << toupper(ch[i]);
		else if ( isupper(ch[i]) ) 
			cout << tolower(ch[i]);
		else 
			cout << ch[i];
	}
	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   12 |                 if (wd = " "){
      |                          ^~~
      |                          |
      |                          const char*
Language: C++

#include<iostream>
#include<cctype>

using namespace std;

int main(){
	int fin;
	char wd,ch[1200]={};
	
	for(int i = 0; i < 1200; i++){
		cin >> wd;
		if (wd = " "){ 
			fin = i;
			break;
		}
		else ch[i] = wd;
	}
	
	for(int i = 0; i < fin; i++){
		if( islower(ch[i]) ) 
			cout << toupper(ch[i]);
		else if ( isupper(ch[i]) ) 
			cout << tolower(ch[i]);
		else 
			cout << ch[i];
	}
	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   12 |                 if (wd = " "){
      |                          ^~~
      |                          |
      |                          const char*
Language: C++

#include<iostream>
#include<cctype>

using namespace std;

int main(){
	int fin;
	char wd,
	const char ch[1200]={};
	
	for(int i = 0; i < 1200; i++){
		cin >> wd;
		if (wd = " "){ 
			fin = i;
			break;
		}
		else ch[i] = wd;
	}
	
	for(int i = 0; i < fin; i++){
		if( islower(ch[i]) ) 
			cout << toupper(ch[i]);
		else if ( isupper(ch[i]) ) 
			cout << tolower(ch[i]);
		else 
			cout << ch[i];
	}
	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected unqualified-id before 'const'
    9 |         const char ch[1200]={};
      |         ^~~~~
a.cc:13:26: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   13 |                 if (wd = " "){
      |                          ^~~
      |                          |
      |                          const char*
a.cc:17:22: error: 'ch' was not declared in this scope
   17 |                 else ch[i] = wd;
      |                      ^~
a.cc:21:29: error: 'ch' was not declared in this scope
   21 |                 if( islower(ch[i]) )
      |                             ^~
Language: C++

#include<iostream>
#include<cctype>

using namespace std;

int main(){
	
	int c;
	
	while(1){
		
		cin >> c;
		if(c == '') break;
		
		if(islower(c))
			c = toupper(c);
		else if(isupper(c))
			c = tolower(c);
		
		cout << c;
	}
	cout << endl;

	return 0;
}

Compiler output:
a.cc:13:25: error: empty character constant
   13 |                 if(c == '') break;
      |                         ^~
Language: C++

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

using namespace std;

int main(){
	
	char c;
	
	while(1){
		
		cin >> c;
		if(c == endl) break;
		
		if(islower(c))
			c = toupper(c);
		else if(isupper(c))
			c = tolower(c);
		
		cout << c;
	}
	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator=='
   14 |                 if(c == endl) break;
      |                    ~~^~~~~~~
Language: C++

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

int main(){
  char ch;

  while(1){
    cin >> ch;
    if(islower(ch)) ch = toupper(ch);
    else if(isupper(ch)) ch = tolower(ch);
    cout << ch;
    if(ch == '\n')     break;
  }
  return 0;
}

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

#include<stdio.h>
#include<cctype>
#define scanf scanf_s

int main()
{
	char ch;

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

		if (islower(ch) != 0) printf("%c", toupper(ch));
		else                  printf("%c", tolower(ch));

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    3 | #define scanf scanf_s
      |               ^~~~~~~
a.cc:10:17: note: in expansion of macro 'scanf'
   10 |                 scanf("%c", &ch);
      |                 ^~~~~
Language: C++

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

int main()
{
	char ch;

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

		if (islower(ch) != 0) printf("%c", toupper(ch));
		else                  printf("%c", tolower(ch));

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    9 |                 scanf_s("%c", &ch);
      |                 ^~~~~~~
      |                 scanf