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

#include<iostream>
#include<cctype>

using namespace std;

int main(){
    char w;
    
    for(int i=1;i=1;i++){
        cin>>w;
        if(int isalpha( w)=="true"){
            if(int islower( w)=="true"){
                cout<<int toupper(char w);
            }
            if(int isupper( w)=="true"){
                cout<<int tolower(char w);
            }
        }
        else{
            cout<<w;
        }
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: expected initializer before '(' token
   11 |         if(int isalpha( w)=="true"){
      |                       ^
a.cc:11:23: error: expected ')' before '(' token
   11 |         if(int isalpha( w)=="true"){
      |           ~           ^
      |                       )
a.cc:12:27: error: expected initializer before '(' token
   12 |             if(int islower( w)=="true"){
      |                           ^
a.cc:12:27: error: expected ')' before '(' token
   12 |             if(int islower( w)=="true"){
      |               ~           ^
      |                           )
a.cc:13:23: error: expected primary-expression before 'int'
   13 |                 cout<<int toupper(char w);
      |                       ^~~
a.cc:15:27: error: expected initializer before '(' token
   15 |             if(int isupper( w)=="true"){
      |                           ^
a.cc:15:27: error: expected ')' before '(' token
   15 |             if(int isupper( w)=="true"){
      |               ~           ^
      |                           )
a.cc:16:23: error: expected primary-expression before 'int'
   16 |                 cout<<int tolower(char w);
      |                       ^~~
Language: C++

#include<iostream>
#include<cctype>

using namespace std;

int main(){
    char w;
    
    for(int i=1;i=1;i++){
        cin>>w;
        if(int isalpha( w)==1){
            if(int islower( w)==1){
                cout<<int toupper(char w);
            }
            if(int isupper(w)==1){
                cout<<int tolower(char w);
            }
        }
        else{
            cout<<w;
        }
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: expected initializer before '(' token
   11 |         if(int isalpha( w)==1){
      |                       ^
a.cc:11:23: error: expected ')' before '(' token
   11 |         if(int isalpha( w)==1){
      |           ~           ^
      |                       )
a.cc:12:27: error: expected initializer before '(' token
   12 |             if(int islower( w)==1){
      |                           ^
a.cc:12:27: error: expected ')' before '(' token
   12 |             if(int islower( w)==1){
      |               ~           ^
      |                           )
a.cc:13:23: error: expected primary-expression before 'int'
   13 |                 cout<<int toupper(char w);
      |                       ^~~
a.cc:15:27: error: expected initializer before '(' token
   15 |             if(int isupper(w)==1){
      |                           ^
a.cc:15:27: error: expected ')' before '(' token
   15 |             if(int isupper(w)==1){
      |               ~           ^
      |                           )
a.cc:16:23: error: expected primary-expression before 'int'
   16 |                 cout<<int tolower(char w);
      |                       ^~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int as[1234],n=0;
    char A[1234];
    for(;;){
        cin>>A[n];
        if(A[n]=='\n')break;
        as[n]=A[n];
        if(as[n]/32==2){
            as[n]+=32;
            cout<<(char)as[n];
        }
        else if(as[n]/32==3){
            as[n]-=32;
            cout<<(char)as[n];
        }
        else if(A[n]==' '){
			cout<<" "+
        }
        else{
            cout<<A[n];
        }
        n++;
    }
    cout<<endl;
}



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

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

int main(){
	char word;

	for (int i = 0; i < 1200; i++){
		cin >> word;
		if (isalpha(word)){
			if (islower(word)){
				printf("%c",  toupper(word));
			}
			if (isupper(word)){
				printf("%c",tolower(word));
			}
		}
		if (!isalpha(word)){
			cout << word;
		}
	}



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

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

using namespace std;

int main() {
  char data;
  do{
    cin >> data;
    if(islower(data[i])) { data[i] = toupper(data[i]); }
    else{ data[i] = tolower(data[i]); }
    printf("%s\n", data);
  }while(data != '\0');
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: 'i' was not declared in this scope
   11 |     if(islower(data[i])) { data[i] = toupper(data[i]); }
      |                     ^
Language: C++

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

using namespace std;

int main() {
  char data;
  do{
    cin >> data;
    if(islower(data[i])) { data[i] = toupper(data[i]); }
    else{ data[i] = tolower(data[i]); }
    printf("%c", data);
  }while(data != '\0')
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: 'i' was not declared in this scope
   11 |     if(islower(data[i])) { data[i] = toupper(data[i]); }
      |                     ^
a.cc:14:23: error: expected ';' before 'cout'
   14 |   }while(data != '\0')
      |                       ^
      |                       ;
   15 |   cout << endl;
      |   ~~~~
Language: C++

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

using namespace std;

int main() {
  char data;
  int i = 0;
  do{
    cin >> data;
    if(islower(data[i])) { data[i] = toupper(data[i]); }
    else{ data[i] = tolower(data[i]); }
    printf("%c", data[i]);
    i++;
  }while(data != '\0')
  cout << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: invalid types 'char[int]' for array subscript
   12 |     if(islower(data[i])) { data[i] = toupper(data[i]); }
      |                    ^
a.cc:12:32: error: invalid types 'char[int]' for array subscript
   12 |     if(islower(data[i])) { data[i] = toupper(data[i]); }
      |                                ^
a.cc:12:50: error: invalid types 'char[int]' for array subscript
   12 |     if(islower(data[i])) { data[i] = toupper(data[i]); }
      |                                                  ^
a.cc:13:15: error: invalid types 'char[int]' for array subscript
   13 |     else{ data[i] = tolower(data[i]); }
      |               ^
a.cc:13:33: error: invalid types 'char[int]' for array subscript
   13 |     else{ data[i] = tolower(data[i]); }
      |                                 ^
a.cc:14:22: error: invalid types 'char[int]' for array subscript
   14 |     printf("%c", data[i]);
      |                      ^
a.cc:16:23: error: expected ';' before 'cout'
   16 |   }while(data != '\0')
      |                       ^
      |                       ;
   17 |   cout << endl;
      |   ~~~~
Language: C++

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

using namespace std;

int main() {
  char data;
  int i = 0;
  while(true)
    cin >> data;
    if('\0' == data) { break; }
    if(islower(data)) { data = toupper(data); }
    else{ data = tolower(data); }
    printf("%c", data);
    i++;
  }
  cout << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: break statement not within loop or switch
   12 |     if('\0' == data) { break; }
      |                        ^~~~~
a.cc: At global scope:
a.cc:18:3: error: 'cout' does not name a type
   18 |   cout << endl;
      |   ^~~~
a.cc:19:3: error: expected unqualified-id before 'return'
   19 |   return 0;
      |   ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

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

using namespace std;

int main() {
  char data;
  int i = 0;
  while(true)
    cin >> data;
    if('\0' == data) { break; }
    if(islower(data)) { data = toupper(data); }
    else{ data = tolower(data); }
    printf("%c", data);
    i++;
  }
  printf('\n');
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: break statement not within loop or switch
   12 |     if('\0' == data) { break; }
      |                        ^~~~~
a.cc: At global scope:
a.cc:18:9: error: expected constructor, destructor, or type conversion before '(' token
   18 |   printf('\n');
      |         ^
a.cc:19:3: error: expected unqualified-id before 'return'
   19 |   return 0;
      |   ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

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

using namespace std;

int main() {
  char data;
  int i = 0;
  while(true){
    cin >> data;
    if('\0' == data) { break; }
    if(islower(data)) { data = toupper(data); }
    else{ data = tolower(data); }
    printf("%c", data);
    i++;
  }
  printf('\n');
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   18 |   printf('\n');
      |          ^~~~
      |          |
      |          char
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<iostream>
#include<cctype>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |         else if(ch[i] == "\n") { cout << ch[i]; break;}
      |                 ~~~~~~^~~~~~~
Language: C++

#include<iostream>
#include<cctype>

using namespace std;

int main () {
    char ch;
    while(1){
        cin >> ch;
        if(islower(ch)) cout<< toupper(ch);
        else if(isupper(ch)) cout << tolower(ch);
        else if(ch == "\n") break;
        else cout << ch;
        i++;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         else if(ch == "\n") break;
      |                 ~~~^~~~~~~
a.cc:14:9: error: 'i' was not declared in this scope
   14 |         i++;
      |         ^
Language: C++

#include <iostream>
#include <cctype>
using namespace std;
int main(){
	char ch;
	while(1) {
		cin >> ch;
		if(ch == '\n'){
			cout << "\n";
			break;	
		}
		
		if(islower(ch)){
			ch = toupper(ch);
		}
		else if(isupper(ch)){
			ch = tolower(ch);
		}
		else{}
		cout << ch;
	}

		
　return 0 ;
}

Compiler output:
a.cc:24:1: error: extended character 　 is not valid in an identifier
   24 | 　return 0 ;
      | ^
a.cc: In function 'int main()':
a.cc:24:1: error: '\U00003000return' was not declared in this scope
   24 | 　return 0 ;
      | ^~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'islower' was not declared in this scope
    8 |         if(islower(ch)){
      |            ^~~~~~~
a.cc:9:18: error: 'toupper' was not declared in this scope
    9 |             ch = toupper(ch);
      |                  ^~~~~~~
a.cc:10:19: error: 'isupper' was not declared in this scope
   10 |         } else if(isupper(ch)){
      |                   ^~~~~~~
a.cc:11:18: error: 'tolower' was not declared in this scope
   11 |             ch = tolower(ch);
      |                  ^~~~~~~
Language: C++

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

int main(){
    char ch;
    
    while(1){
        scanf("%c", &ch);
        if (ch == "\n") { break; }
        
        if (islower(ch)) {
            ch = toupper(ch);
        }
        else if (isupper(ch)) {
            ch = tolower(ch);
        }
       
        cout << ch << endl;
    }
    
    return 0;
}

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

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

int main()
bool f,g;
{
char ch;
while(1){
f=false;
g=false;
scanf("%c",&ch);
f=islower(ch);
g=isupper(ch);
if(f==true&&g==false){toupper(ch);printf("%c")}
else if(f==false&&g==true){tolower(ch);printf("%c")}
if(ch=="\n"){printf(",");break;}
}
return 0;
}

Compiler output:
a.cc:5:1: error: expected initializer before 'bool'
    5 | bool f,g;
      | ^~~~
a.cc:6:1: error: expected unqualified-id before '{' token
    6 | {
      | ^
Language: C++

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

int main()
bool f,g;
{
char ch;
while(1){
f=false;
g=false;
scanf("%c",&ch);
f=islower(ch);
g=isupper(ch);
if(f==true&&g==false){toupper(ch);printf("%c");}
else if(f==false&&g==true){tolower(ch);printf("%c");}
if(ch=="\n"){printf(",");break;}
}
return 0;
}

Compiler output:
a.cc:5:1: error: expected initializer before 'bool'
    5 | bool f,g;
      | ^~~~
a.cc:6:1: error: expected unqualified-id before '{' token
    6 | {
      | ^
Language: C++

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

int main()
int f,g;
{
char ch;
while(1){
f=0;
g=0;
scanf("%c",&ch);
f=islower(ch);
g=isupper(ch);
if(f!=0&&g==0){toupper(ch);printf("%c");}
else if(f==0&&g!=0){tolower(ch);printf("%c");}
if(ch=="\n"){printf(",");break;}
}
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<stdio.h>
int main (){
char ch;
while(1)
{
scanf("%c",&ch);
if ( ch == '\n' ) break;
if(islower(ch)){ch=toupper(ch);printf("%c",ch);}
else if(isupper(ch)){ ch=tolower(ch);printf("%c",ch);}
else printf("%c",ch);}

}
printf"\n");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:4: error: 'islower' was not declared in this scope
    8 | if(islower(ch)){ch=toupper(ch);printf("%c",ch);}
      |    ^~~~~~~
a.cc:8:20: error: 'toupper' was not declared in this scope
    8 | if(islower(ch)){ch=toupper(ch);printf("%c",ch);}
      |                    ^~~~~~~
a.cc:9:9: error: 'isupper' was not declared in this scope
    9 | else if(isupper(ch)){ ch=tolower(ch);printf("%c",ch);}
      |         ^~~~~~~
a.cc:9:26: error: 'tolower' was not declared in this scope
    9 | else if(isupper(ch)){ ch=tolower(ch);printf("%c",ch);}
      |                          ^~~~~~~
a.cc: At global scope:
a.cc:13:1: error: 'printf' does not name a type
   13 | printf"\n");
      | ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include<stdio.h>
  +++ |+#include <cstdio>
    2 | int main (){
a.cc:14:1: error: expected unqualified-id before 'return'
   14 | return 0;
      | ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: C++

#include<cstdio>
#include<cctype>

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

	return 0;
}

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

#include<cstdio>
#include<cctype>

int main(){
	char ch;
	while(1){
		scanf("%c", &ch);
		if(isalpha(ch)){
			if(islower){
				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:15:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |                         if(ch == "\n") break;
      |                            ~~~^~~~~~~
Language: C++

#include<cstdio>
#include<cctype>

int main(){
	char ch;
	while(1){
		scanf("%c", &ch);
		if(isalpha(ch)){
			if(islower) 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:12:41: error: expected ';' before 'if'
   12 |                         printf("%c", ch)
      |                                         ^
      |                                         ;
   13 |                 if(ch == '\n') break;
      |                 ~~                       
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
	char str[1200];
	int j;
	cin.getline(str, 1200);
	size_t len = strlen(str);
	
	for(j = 0; j <= len-1; j++){
		if(islower(str[j]) != 0){
			str[j] = toupper(str[j]);
			continue;
		}
		else if(isupper(str[j]) != 0){
			str[j] = tolower(str[j]);
			continue;
		}
	}
	
	for(j = 0; j <= len; j++){
		cout << str[j];
	}
	cout << endl;
	
	return 0;
}

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

#include<cctype>
#include<iostream>
#include<string.h>
using namespace std;
int main(void){
    char ch[1202];
    cin >> ch;
    for(int i = 0; i < strlen(ch); i++){
        if(islower(ch[i]){
            cout << toupper(ch[i]);
        }
        if(ch[i] == '\n'){
            break;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected ';' before '{' token
    9 |         if(islower(ch[i]){
      |                          ^
      |                          ;
a.cc:12:9: error: expected primary-expression before 'if'
   12 |         if(ch[i] == '\n'){
      |         ^~
a.cc:11:10: error: expected ')' before 'if'
   11 |         }
      |          ^
      |          )
   12 |         if(ch[i] == '\n'){
      |         ~~
a.cc:9:11: note: to match this '('
    9 |         if(islower(ch[i]){
      |           ^
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:5:15: note: to match this '{'
    5 | int main(void){
      |               ^
Language: C++

#include<cctype>
#include<iostream>
#include<string.h>
using namespace std;
int main(void){
    char ch[1202];
    cin >> ch;
    for(int i = 0; i < strlen(ch); i++){
        if(islower(ch[i]){
            cout << toupper(ch[i]);
        }
        if(ch[i] == '\n'){
            break;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected ')' before '{' token
    9 |         if(islower(ch[i]){
      |           ~              ^
      |                          )
a.cc:15:5: error: expected primary-expression before '}' token
   15 |     }
      |     ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	char ch;
	while(1){
		cin >> ch;
		if(isalpha(ch)){
			if(isupper(ch)){
				cout << tolower(ch);
			}else{
				cout << toupper(ch);
			}

		}else{
			cout << ch;
		}

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

Compiler output:
a.cc:18:26: error: stray '\' in program
   18 |                 if(ch == \n) break;
      |                          ^
a.cc: In function 'int main()':
a.cc:18:27: error: 'n' was not declared in this scope
   18 |                 if(ch == \n) break;
      |                           ^
Language: C++

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

int main(){
	/*char c[100];
	fgets(c,100,stdin);
	for (int i = 0;i<1200;i++){
			if (c[i] == '\n') break;
			if (islower(c[i])) c[i] = toupper(c[i]);
			else if (isupper(c[i])) c[i] = tolower(c[i]);
			printf("%c",c[i]);
		
			
	}
	printf("\n");*/
	
	char c;
		while(1){
		scanf("%c",&c);
			if (c == '\n') break;
			if (islower(c)) c = toupper(c);
			else if (isupper(c)) c = tolower(c);
			printf("%c",c);
		
			
	}
	printf("\n");
	return 0;
}
tf("\n");

Compiler output:
a.cc:31:3: error: expected constructor, destructor, or type conversion before '(' token
   31 | tf("\n");
      |   ^
Language: C++

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

int main(void){
	char ch;

	while (1){
		scanf_s("%c", &ch);
		
		if (islower(ch)) cout << (char)toupper(ch);
		else if (isupper(ch)) cout << (char)tolower(ch);
		else cout << 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
Language: C++

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

int main(void){
	char ch = ' ';

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

		if (islower(ch)) printf("%c",(char)toupper(ch));
		else if (isupper(ch))  printf("%c", (char)tolower(ch));
		else  printf("%c", 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
Language: C++

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

int main(){
	
	char data;
	int a, b;
	
	while(1){
		
		scanf("%c",&data);
		
		if ( ch == '\n' ) break;
		
		a = int isupper(char data);
		
		if(a){
			
			b = int tolower(char data);
		}
		
		else{
			
			b = int toupper(char data);
		}
		
		printf("%c",b);
	}
	
	printf("\n");
	
	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<cstdio>
#include<cctype>
int main()
{
	char ch;
	while(1)
	{
		scanf("%c", &ch);
		if( isalpha(ch) )
		{
			if( islower(ch) ) printf("%c", toupper(ch));
			else printf("%c", tolower(ch));
		}
		else printf("%c", ch)
	if ( ch == '/n' )break
	}
	return 0;
}

Compiler output:
a.cc:15:20: warning: multi-character character constant [-Wmultichar]
   15 |         if ( ch == '/n' )break
      |                    ^~~~
a.cc: In function 'int main()':
a.cc:14:38: error: expected ';' before 'if'
   14 |                 else printf("%c", ch)
      |                                      ^
      |                                      ;
   15 |         if ( ch == '/n' )break
      |         ~~
Language: C++

//
//  main.cpp
//  ITP1_8-A
//
//  Created by ?????¶??? on 15/7/14.
//  Copyright (c) 2015??´ ?????¶???. All rights reserved.
//

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

int main ()
{

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

Compiler output:
a.cc: In function 'int main()':
a.cc:32:17: error: 'isnumber' was not declared in this scope
   32 |             if (isnumber(ch)) {
      |                 ^~~~~~~~
Language: C++

//
//  main.cpp
//  ITP1_8-A
//
//  Created by Saicj on 2015/07/15.
//  Copyright (c) 2015??´ saicj. All rights reserved.
//

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

int main(int argc, const char * argv[])
{
    
    
    char ch;
    bool toUpper = true;
    
    while (1) {
        
        scanf("%c", &ch);
        
        if (isupper(ch) || islower(ch)){
            
            if (toUpper){
                ch = toupper(ch);
                toUpper = false;
            }else{
                ch = tolower(ch);
            }
            
        }
        
        if (isnumber(ch)){
           toUpper = true;
        }
        
        printf("%c", ch);
        
        
        if (ch == '\n') {
            break;
        }
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:36:13: error: 'isnumber' was not declared in this scope
   36 |         if (isnumber(ch)){
      |             ^~~~~~~~
Language: C++

//
//  main.cpp
//  ITP1_8-A
//
//  Created by Saicj on 2015/07/15.
//  Copyright (c) 2015??´ saicj. All rights reserved.
//

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

int main(int argc, const char * argv[])
{
    
    
    char ch;
    bool toUpper = true;
    
    while (1) {
        
        scanf("%c", &ch);
        
        if (isupper(ch) || islower(ch)){
            
            if (toUpper){
                ch = toupper(ch);
                toUpper = false;
            }else{
                ch = tolower(ch);
            }
            
        }
        
        if (isnumber(ch)){
           toUpper = true;
        }
        
        printf("%c", ch);
        
        
        if (ch == '\n') {
            break;
        }
    }
    
    return 0;
}

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

#include <stdio.h>


int main(){
    char s[1300];
    
    scanf("%s", s);
    for (char *p=s; *p!='\0'; p++){
        if (*p >='a' && *p <= 'z'){
            printf("%c", *p-'a'+'A';
        } else if (*p >='A' && *p <= 'Z'){
            printf("%c", *p-'A'+'a';
        } else {
            printf("%c", *p);
        }
    }
    

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:36: error: expected ')' before ';' token
   10 |             printf("%c", *p-'a'+'A';
      |                   ~                ^
      |                                    )
a.cc:12:36: error: expected ')' before ';' token
   12 |             printf("%c", *p-'A'+'a';
      |                   ~                ^
      |                                    )
Language: C++

#include <iostream>
//#include <iomanip>
//#include <vector>
#include <string>
#include <algorithm>

using namespace std;

int main(){

	string in;

	getline(cin, in);
	transform(in.begin(), in.end(), in.begin(), toupper);

	cout << in;


	return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:44: error: 'printg' was not declared in this scope; did you mean 'printf'?
    9 |     else if (isupper(ch)){ ch=tolower(ch); printg("%c", ch); }  // ch?????§????????????true?????????
      |                                            ^~~~~~
      |                                            printf
Language: C++

#include <stdio.h>
int main(void) {
  char ch;
  char temp, i;

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

    if (islower(ch)) {
      printf("%c", toupper(ch));
    } else if (isupper(ch)) {
      printf("%c", tolower(ch));
    } else if (ch == '\n') {
      break;
    } else {
      printf("%c", ch);
    }
  }

  puts("");

  return 0;
}

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

#include <stdio.h>
#include <stdlib.h>
int main(void) {
  char ch;
  char temp, i;

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

    if (islower(ch)) {
      printf("%c", toupper(ch));
    } else if (isupper(ch)) {
      printf("%c", tolower(ch));
    } else if (ch == '\n') {
      break;
    } else {
      printf("%c", ch);
    }
  }

  puts("");

  return 0;
}

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

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

int main(void) {
	char str[1200], ans[1200], i, len;
	gets(str);
	len = strlen(str);
	for (i = 0; i < len; i++) {
		if (str[i] >= 'a' && str[i] <= 'z')
			ans[i] = str[i] - 'a' + 'A';
		else if (str[i] >= 'A' && str[i] <= 'Z')
			ans[i] = str[i] - 'A' + 'a';
		else
			ans[i] = str[i];
	}
	ans[i] = '\0';
	cout << ans << endl;
	return 0;
}

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

#include<iostream>
#inlcude<cctype>

using namespace std;

int main(){
	char t[1200];
	cin >> t;
	while(1){
		int i = 0;
		
		if(t[i] == '\n') break;
		if(isalpha(t[i])){
			if(islower(t[i])) toupper(t[i]);
			if(isupper[t[i]]) tolower(t[i]);
		}
		cout << t[i];
		i++;
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude<cctype>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:15:35: error: invalid types '<unresolved overloaded function type>[char]' for array subscript
   15 |                         if(isupper[t[i]]) tolower(t[i]);
      |                                   ^
Language: C++

#include<iostream>
#inlcude<cctype>

using namespace std;

int main(){
	char t;
	cin >> t;
	while(1){
		int i = 0;
		
		if(t[i] == '\n') break;
		if(isalpha(t[i])){
			if(islower(t[i])) toupper(t[i]);
			if(isupper[t[i]]) tolower(t[i]);
		}
		cout << t[i];
		i++;
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude<cctype>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:12:21: error: invalid types 'char[int]' for array subscript
   12 |                 if(t[i] == '\n') break;
      |                     ^
a.cc:13:29: error: invalid types 'char[int]' for array subscript
   13 |                 if(isalpha(t[i])){
      |                             ^
a.cc:14:37: error: invalid types 'char[int]' for array subscript
   14 |                         if(islower(t[i])) toupper(t[i]);
      |                                     ^
a.cc:14:52: error: invalid types 'char[int]' for array subscript
   14 |                         if(islower(t[i])) toupper(t[i]);
      |                                                    ^
a.cc:15:37: error: invalid types 'char[int]' for array subscript
   15 |                         if(isupper[t[i]]) tolower(t[i]);
      |                                     ^
a.cc:15:52: error: invalid types 'char[int]' for array subscript
   15 |                         if(isupper[t[i]]) tolower(t[i]);
      |                                                    ^
a.cc:17:26: error: invalid types 'char[int]' for array subscript
   17 |                 cout << t[i];
      |                          ^
Language: C++

#include<iostream>
#inlcude<cctype>

using namespace std;

int main(){
	char t[1200];
for(int j; j < 1200; j++){
t[j] = 0;
}	

cin >> t;
	while(1){
		int i = 0;
		
		if(t[i] == '\n') break;
		if(isalpha(t[i])){
			if(islower(t[i])) toupper(t[i]);
			if(isupper[t[i]]) tolower(t[i]);
		}
		cout << t[i];
		i++;
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude<cctype>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:19:35: error: invalid types '<unresolved overloaded function type>[char]' for array subscript
   19 |                         if(isupper[t[i]]) tolower(t[i]);
      |                                   ^
Language: C++

#include<iostream>
#include<cctype>

using namespace std;

int main(){
	char t[1200];	
cin >> t;
	while(1){
		int i = 0;
		
		if(t[i] == '\n') break;
		if(isalpha(t[i])){
			if(islower(t[i])) toupper(t[i]);
			if(isupper[t[i]]) tolower(t[i]);
		}
		cout << t[i];
		i++;
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:35: error: invalid types '<unresolved overloaded function type>[char]' for array subscript
   15 |                         if(isupper[t[i]]) tolower(t[i]);
      |                                   ^
Language: C++

#include<iostream>
#include<cctype>

using namespace std;

int main(){
	char t[1201];	
cin >> t;
	while(1){
		int i = 0;
		
		if(t[i] == '\n') break;
		if(isalpha(t[i])){
			if(islower(t[i])) toupper(t[i]);
			if(isupper[t[i]]) tolower(t[i]);
		}
		cout << t[i];
		i++;
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:35: error: invalid types '<unresolved overloaded function type>[char]' for array subscript
   15 |                         if(isupper[t[i]]) tolower(t[i]);
      |                                   ^
Language: C++

#include<iostream>
#inlcude<cctype>

using namespace std;

int main(){
	char t;
	
	cin >> t;
	while(1){
		if(t == '\n') break;
		if(isalpha(t)){
			if(islower(t)) toupper(t);
			if(isupper(t)) tolower(t);
		}
		cout << t;
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude<cctype>
      |  ^~~~~~~
      |  include
Language: C++

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

int main(){
char Big[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
char small[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
string str1;
char str2[2000];
CHAR str3[2000];
int len;
str str4="";

cin>>str1;
len=str1.length();

for(int i=1;i<=len;i++){
str2[i]=str1.substr(i,1);
}

for(int i=1;i<=len;i++){
for(int j=0;j<26;j++){
if(str2[i]==Big[j]){
str3[i]=small[j];
}
else if(str2[i]==small[j]){
str3[i]=Big[j];
}
else{
str3[i]=str2[i];
}
}
}

for(int i=1;i<=len;i++){
str4 += str3[i];
}

cout<<str4;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: 'CHAR' was not declared in this scope
   10 | CHAR str3[2000];
      | ^~~~
a.cc:12:1: error: 'str' was not declared in this scope; did you mean 'str2'?
   12 | str str4="";
      | ^~~
      | str2
a.cc:18:20: error: cannot convert 'std::__cxx11::basic_string<char>' to 'char' in assignment
   18 | str2[i]=str1.substr(i,1);
      |         ~~~~~~~~~~~^~~~~
      |                    |
      |                    std::__cxx11::basic_string<char>
a.cc:24:1: error: 'str3' was not declared in this scope; did you mean 'str2'?
   24 | str3[i]=small[j];
      | ^~~~
      | str2
a.cc:27:1: error: 'str3' was not declared in this scope; did you mean 'str2'?
   27 | str3[i]=Big[j];
      | ^~~~
      | str2
a.cc:30:1: error: 'str3' was not declared in this scope; did you mean 'str2'?
   30 | str3[i]=str2[i];
      | ^~~~
      | str2
a.cc:36:1: error: 'str4' was not declared in this scope; did you mean 'str2'?
   36 | str4 += str3[i];
      | ^~~~
      | str2
a.cc:36:9: error: 'str3' was not declared in this scope; did you mean 'str2'?
   36 | str4 += str3[i];
      |         ^~~~
      |         str2
a.cc:39:7: error: 'str4' was not declared in this scope; did you mean 'str2'?
   39 | cout<<str4;
      |       ^~~~
      |       str2
Language: C++

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

int main(){
char Big[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
char small[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
string str1;
char str2[2000];
char str3[2000];
int len;
str str4="";

cin>>str1;
len=str1.length();

for(int i=1;i<=len;i++){
str2[i]=str1.substr(i,1);
}

for(int i=1;i<=len;i++){
for(int j=0;j<26;j++){
if(str2[i]==Big[j]){
str3[i]=small[j];
}
else if(str2[i]==small[j]){
str3[i]=Big[j];
}
else{
str3[i]=str2[i];
}
}
}

for(int i=1;i<=len;i++){
str4 += str3[i];
}

cout<<str4;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'str' was not declared in this scope; did you mean 'str3'?
   12 | str str4="";
      | ^~~
      | str3
a.cc:18:20: error: cannot convert 'std::__cxx11::basic_string<char>' to 'char' in assignment
   18 | str2[i]=str1.substr(i,1);
      |         ~~~~~~~~~~~^~~~~
      |                    |
      |                    std::__cxx11::basic_string<char>
a.cc:36:1: error: 'str4' was not declared in this scope; did you mean 'str3'?
   36 | str4 += str3[i];
      | ^~~~
      | str3
a.cc:39:7: error: 'str4' was not declared in this scope; did you mean 'str3'?
   39 | cout<<str4;
      |       ^~~~
      |       str3
Language: C++

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

int main(){
char Big[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
char small[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
string str1;
char str2[2000];
char str3[2000];
int len;
str str4;

cin>>str1;
len=str1.length();

for(int i=1;i<=len;i++){
str2[i]=static_cast<char(str1.substr(i,1));

for(int i=1;i<=len;i++){
for(int j=0;j<26;j++){
if(str2[i]==Big[j]){
str3[i]=small[j];
}
else if(str2[i]==small[j]){
str3[i]=Big[j];
}
else{
str3[i]=str2[i];
}
}
}

for(int i=1;i<=len;i++){
str4 += str3[i];
}

cout<<str4;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'str' was not declared in this scope; did you mean 'str3'?
   12 | str str4;
      | ^~~
      | str3
a.cc:18:25: error: expected '>' before '(' token
   18 | str2[i]=static_cast<char(str1.substr(i,1));
      |                         ^
a.cc:18:9: error: invalid 'static_cast' from type 'std::__cxx11::basic_string<char>' to type 'char'
   18 | str2[i]=static_cast<char(str1.substr(i,1));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:35:1: error: 'str4' was not declared in this scope; did you mean 'str3'?
   35 | str4 += str3[i];
      | ^~~~
      | str3
a.cc:38:7: error: 'str4' was not declared in this scope; did you mean 'str3'?
   38 | cout<<str4;
      |       ^~~~
      |       str3
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

int main(){
char Big[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
char small[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
string str1;
char str2[2000];
char str3[2000];
int len;
string str4;

cin>>str1;
len=str1.length();

for(int i=1;i<=len;i++){
str2[i]=static_cast<char>(str1.substr(i,1));

for(int i=1;i<=len;i++){
for(int j=0;j<26;j++){
if(str2[i]==Big[j]){
str3[i]=small[j];
}
else if(str2[i]==small[j]){
str3[i]=Big[j];
}
else{
str3[i]=str2[i];
}
}
}

for(int i=1;i<=len;i++){
str4 += str3[i];
}

cout<<str4;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: invalid 'static_cast' from type 'std::__cxx11::basic_string<char>' to type 'char'
   18 | str2[i]=static_cast<char>(str1.substr(i,1));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

int main(){
char str[2000];
cin >> str;

int len = strlen(str);
for(int i=0;i<len;i++){
	if(str[i] >= 'A' && str[i] <= 'Z'){
		str[i] = str[i] - 'A' + 'a';
	}else if(str[i] >= 'a' && str[i] <= 'z'){
		str[i] = str[i] - 'a' + 'A';
	}
}

cout << str << endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'strlen' was not declared in this scope
    9 | int len = strlen(str);
      |           ^~~~~~
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<stdio.h>
#include<string.h>

int main(){
	char ch;
	while(1){
		scanf("%c",&ch);
		
		if(islower(ch)){
			printf("%c",toupper(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));
      |                                     ^~~~~~~
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{
			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));
      |                                     ^~~~~~~
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{
			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: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(){
      |           ^