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

#include <iostream>
using namespace std;
int main(){
    while(1){
        char ch;
        char a;
        cin>>ch;
        int islower(char ch);
        if(ch==true){
            int toupper(char ch);
        }else{
            int toupper(char ch);
        }
        int isupper(char ch);
        if(ch==true){
            int tolower(char ch);
        }else{
            int toupper(char ch);
        }
        scanf(“%c”, &ch);
        printf(“%c = %d¥n”, ch, ch);
    }
    
    return 0;
}


Compiler output:
a.cc:20:15: error: extended character “ is not valid in an identifier
   20 |         scanf(“%c”, &ch);
      |               ^
a.cc:20:17: error: extended character ” is not valid in an identifier
   20 |         scanf(“%c”, &ch);
      |                 ^
a.cc:21:16: error: extended character “ is not valid in an identifier
   21 |         printf(“%c = %d¥n”, ch, ch);
      |                ^
a.cc:21:23: error: extended character ¥ is not valid in an identifier
   21 |         printf(“%c = %d¥n”, ch, ch);
      |                       ^
a.cc:21:23: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:20:15: error: '\U0000201c' was not declared in this scope
   20 |         scanf(“%c”, &ch);
      |               ^
a.cc:20:17: error: 'c\U0000201d' was not declared in this scope
   20 |         scanf(“%c”, &ch);
      |                 ^~
a.cc:21:18: error: 'c' was not declared in this scope
   21 |         printf(“%c = %d¥n”, ch, ch);
      |                  ^
a.cc:21:22: error: expected primary-expression before '%' token
   21 |         printf(“%c = %d¥n”, ch, ch);
      |                      ^
a.cc:21:23: error: 'd\U000000a5n\U0000201d' was not declared in this scope
   21 |         printf(“%c = %d¥n”, ch, ch);
      |                       ^~~~
Language: C++

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

int main(){
    
    char ch;
    
    while(1){
        scanf("%c", &ch);
        if ( ch == '\n') break;
        else if ( 65 <= 'ch' && 'ch' <= 90 ){
            'ch' += 32;
            printf ( "%c", ch );
        }
        else printf ( "%c", ch );
    }
    return 0;
}


Compiler output:
a.cc:12:25: warning: multi-character character constant [-Wmultichar]
   12 |         else if ( 65 <= 'ch' && 'ch' <= 90 ){
      |                         ^~~~
a.cc:12:33: warning: multi-character character constant [-Wmultichar]
   12 |         else if ( 65 <= 'ch' && 'ch' <= 90 ){
      |                                 ^~~~
a.cc:13:13: warning: multi-character character constant [-Wmultichar]
   13 |             'ch' += 32;
      |             ^~~~
a.cc: In function 'int main()':
a.cc:13:21: error: lvalue required as left operand of assignment
   13 |             'ch' += 32;
      |                     ^~
Language: C++

#include(cstdio)
#include(cctype)

using namespace std;

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


Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(cstdio)
      |         ^
a.cc:2:9: error: #include expects "FILENAME" or <FILENAME>
    2 | #include(cctype)
      |         ^
a.cc: In function 'int main()':
a.cc:9:9: error: 'scanf' was not declared in this scope
    9 |         scanf("%c", &ch);
      |         ^~~~~
a.cc:11:18: error: 'isalpha' was not declared in this scope
   11 |         else if (isalpha(ch)) {
      |                  ^~~~~~~
a.cc:12:17: error: 'isupper' was not declared in this scope
   12 |             if (isupper(ch)) printf("%c", tolower(ch));
      |                 ^~~~~~~
a.cc:12:43: error: 'tolower' was not declared in this scope
   12 |             if (isupper(ch)) printf("%c", tolower(ch));
      |                                           ^~~~~~~
a.cc:12:30: error: 'printf' was not declared in this scope
   12 |             if (isupper(ch)) printf("%c", tolower(ch));
      |                              ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #include(cstdio)
a.cc:13:31: error: 'toupper' was not declared in this scope
   13 |             else printf("%c", toupper(ch));
      |                               ^~~~~~~
a.cc:13:18: error: 'printf' was not declared in this scope
   13 |             else printf("%c", toupper(ch));
      |                  ^~~~~~
a.cc:13:18: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:15:14: error: 'printf' was not declared in this scope
   15 |         else printf("%c", ch);
      |              ^~~~~~
a.cc:15:14: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:17:5: error: 'printf' was not declared in this scope
   17 |     printf("\n");
      |     ^~~~~~
a.cc:17:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
int main(){
    char ch='A',x='A';
    int k=0;
    while(k<1200){
        
        scanf("%c",&ch);
        if(isalpha(ch)){
            if(islower(ch)){
                x=toupper(ch);
            }else{
                x=tolower(ch);
            }
            printf("%c",x);
        }else{
            printf("%c",ch);
        }
        k+=1;
        ch= /0;
    }
    cout<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: expected primary-expression before '/' token
   22 |         ch= /0;
      |             ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
int main(){
    char ch='A',x='A';
    int k=0;
    while(k<1200){
        
        scanf("%c",&ch);
        if(isalpha(ch)){
            if(islower(ch)){
                x=toupper(ch);
            }else{
                x=tolower(ch);
            }
            printf("%c",x);
        }else{
            printf("%c",ch);
        }
        k+=1;
        ch= null;
    }
    cout<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: 'null' was not declared in this scope
   22 |         ch= null;
      |             ^~~~
Language: C++

#include<cstdio>
#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{
            print("%s", ",")
        }
        if(ch == '\n')break;
    }return 0;
    
}


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

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


Compiler output:
a.cc:9:20: warning: multi-character character constant [-Wmultichar]
    9 |         if ( ch == '¥0' ) break;
      |                    ^~~~
a.cc: In function 'int main()':
a.cc:12:31: error: expected ';' before 'printf'
   12 |             else (isupper(ch)) printf("%c",ch=tolower(ch));
      |                               ^~~~~~~
      |                               ;
Language: C++

#include<cstdio>
3include<cctype>

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


Compiler output:
a.cc:9:16: error: stray '\' in program
    9 |         if(ch==\n) break;
      |                ^
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 3include<cctype>
      | ^~~~~~~~
Language: C++

#include<cstdio>
#include<cctype>

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


Compiler output:
a.cc:9:16: error: stray '\' in program
    9 |         if(ch==\n) break;
      |                ^
a.cc: In function 'int main()':
a.cc:9:17: error: 'n' was not declared in this scope
    9 |         if(ch==\n) break;
      |                 ^
a.cc:12:17: error: expected '(' before 'printf'
   12 |         else if printf("%c",ch);
      |                 ^~~~~~
      |                 (
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
int main(){ 
    char ch;
    while(1){
        scanf("%c",&ch);
        if (ch=='¥0') break;
        else  if(isalpha(ch)){
            if(isupper(ch)) printf("%c",tolower(ch));
            else if(islower(ch)) printf("%c",toupper(ch));
        }else ("%c",ch);
    return 0;
    }
    


Compiler output:
a.cc:9:17: warning: multi-character character constant [-Wmultichar]
    9 |         if (ch=='¥0') break;
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:15:6: error: expected '}' at end of input
   15 |     }
      |      ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
int main(){ 
    char ch;
    while(1){
        scanf("%c",&ch);
        if (ch=='¥0') break;
        else  if(isalpha(ch)){
            if(isupper(ch)) printf("%c",tolower(ch));
            else if(islower(ch)) printf("%c",toupper(ch));
        }else printf("%c",ch);
    return 0;
    }
    


Compiler output:
a.cc:9:17: warning: multi-character character constant [-Wmultichar]
    9 |         if (ch=='¥0') break;
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:15:6: error: expected '}' at end of input
   15 |     }
      |      ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
int main(){ 
    char ch;
    while(1){
        scanf("%c",&ch);
        if (ch=='¥0') break;
        else  if(isalpha(ch)){
            if(isupper(ch)) printf("%c",tolower(ch));
            else if(islower(ch)) printf("%c",toupper(ch));
        }else printf("%c",ch);
    return 0;
}
    


Compiler output:
a.cc:9:17: warning: multi-character character constant [-Wmultichar]
    9 |         if (ch=='¥0') break;
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cctype>
using namespace std;
int main(){ 
    char ch;
    while(1){
        scanf("%c",&ch);
        if (ch=='\n') break;
        else  if(isalpha(ch)){
            if(isupper(ch)) printf("%c",tolower(ch));
            else if(islower(ch)) printf("%c",toupper(ch));
        }else printf("%c",ch);
    }return 0;
    cout<<\n<<endl;
}
    


Compiler output:
a.cc:15:11: error: stray '\' in program
   15 |     cout<<\n<<endl;
      |           ^
a.cc: In function 'int main()':
a.cc:15:12: error: 'n' was not declared in this scope
   15 |     cout<<\n<<endl;
      |            ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: expected ';' before 'return'
   16 |     printf("\n")
      |                 ^
      |                 ;
   17 |     return 0;
      |     ~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: expected ';' before '}' token
   15 |     printf("\n")
      |                 ^
      |                 ;
   16 | }
      | ~
Language: C++

#include<cctype>
#include<stdio.h>
#include<cstdio>
using namespace std;
int main(){
    char ch;
    while(1){
        scanf("%c",&ch);
        if(ch=='\n') break;
        else if('a'<=ch && ch<='z'){
            printf("%c\n",ch-32);
        }else if('A'<=ch && ch<='Z'){
            printf("%c\n",ch+32);  
        }else if{
            printf("%c\n",ch);
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: expected '(' before '{' token
   14 |         }else if{
      |                 ^
      |                 (
Language: C++

#include<cctype>
#include<stdio.h>
#include<cstdio>
using namespace std;
int main(){
    char ch;
    while(1){
        scanf("%c",&ch);
        else if('a'<=ch && ch<='z'){
            printf("%c\n",ch-32);
        }else if('A'<=ch && ch<='Z'){
            printf("%c\n",ch+32);  
        }else {
            printf("%c\n",ch);
        }
        if ( ch == '\n' ) break;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'else' without a previous 'if'
    9 |         else if('a'<=ch && ch<='z'){
      |         ^~~~
Language: C++

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

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


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

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

int main(){
    int i = 0;
    char ch[1200];
    while(i < 1200){

        scanf("%c", &ch[i]);
        if(ch[i] == '\n'){
            break;
        } else if(islower(ch[i])){
            ch[i] = toupper(ch);
        } else if(isupper(ch[i])){
            ch[i] = tolower(ch);
        } 
         printf("%c", ch[i])
        i += 1;
    }
 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: no matching function for call to 'toupper(char [1200])'
   14 |             ch[i] = toupper(ch);
      |                     ~~~~~~~^~~~
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/ctype.h:125:12: note: candidate: 'int toupper(int)' (near match)
  125 | extern int toupper (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:125:12: note:   conversion of argument 1 would be ill-formed:
a.cc:14:29: error: invalid conversion from 'char*' to 'int' [-fpermissive]
   14 |             ch[i] = toupper(ch);
      |                             ^~
      |                             |
      |                             char*
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/locale_facets.h:2687:5: note: candidate: 'template<class _CharT> _CharT std::toupper(_CharT, const locale&)'
 2687 |     toupper(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2687:5: note:   candidate expects 2 arguments, 1 provided
a.cc:16:28: error: no matching function for call to 'tolower(char [1200])'
   16 |             ch[i] = tolower(ch);
      |                     ~~~~~~~^~~~
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)' (near match)
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:12: note:   conversion of argument 1 would be ill-formed:
a.cc:16:29: error: invalid conversion from 'char*' to 'int' [-fpermissive]
   16 |             ch[i] = tolower(ch);
      |                             ^~
      |                             |
      |                             char*
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
a.cc:18:29: error: expected ';' before 'i'
   18 |          printf("%c", ch[i])
      |                             ^
      |                             ;
   19 |         i += 1;
      |         ~
Language: C++

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

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


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

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

int main(){
    int i = 0;
    char ch[1200];
    while(i < 1200){

        scanf("%c", &ch[i]);
        if(ch[i] == '\n'){
            break;
        } else if(islower(ch[i])){
            ch[i] = toupper(ch);
        } else if(isupper(ch[i])){
            ch[i] = tolower(ch);
        } 
         printf("%c", ch[i])
        i += 1;
    }
 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: no matching function for call to 'toupper(char [1200])'
   15 |             ch[i] = toupper(ch);
      |                     ~~~~~~~^~~~
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/ctype.h:125:12: note: candidate: 'int toupper(int)' (near match)
  125 | extern int toupper (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:125:12: note:   conversion of argument 1 would be ill-formed:
a.cc:15:29: error: invalid conversion from 'char*' to 'int' [-fpermissive]
   15 |             ch[i] = toupper(ch);
      |                             ^~
      |                             |
      |                             char*
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/locale_facets.h:2687:5: note: candidate: 'template<class _CharT> _CharT std::toupper(_CharT, const locale&)'
 2687 |     toupper(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2687:5: note:   candidate expects 2 arguments, 1 provided
a.cc:17:28: error: no matching function for call to 'tolower(char [1200])'
   17 |             ch[i] = tolower(ch);
      |                     ~~~~~~~^~~~
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)' (near match)
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:12: note:   conversion of argument 1 would be ill-formed:
a.cc:17:29: error: invalid conversion from 'char*' to 'int' [-fpermissive]
   17 |             ch[i] = tolower(ch);
      |                             ^~
      |                             |
      |                             char*
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
a.cc:19:29: error: expected ';' before 'i'
   19 |          printf("%c", ch[i])
      |                             ^
      |                             ;
   20 |         i += 1;
      |         ~
Language: C++

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

int main(){
    
    char ch;
    
    while(1){
        scanf("%c", &ch);
        if ( ch == '\n') break;
        else if ( 65 <= ch && ch <= 90 ){
            ch += 32;
            printf ( "%c", ch );
        }
        else if ( 97 <= ch && ch <= 122 ){
            ch -= 32;
            printf ( "%c", ch);
        }
        else printf ( "%c", ch );
    }
    printf("\n")
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: expected ';' before 'return'
   22 |     printf("\n")
      |                 ^
      |                 ;
   23 |     return 0;
      |     ~~~~~~
Language: C++

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

int main(){
    int i = 0;
    char ch[1200];
    while(i < 1200){

        scanf("%c", &ch[i]);
        if(ch[i] == '\n'){
            break;
        } else if(isalpha(ch[i])){
            if (islower(ch[i])){
                ch[i] = toupper(ch[i]);
            
            }else if(isupper(ch[i])){
                ch[i] = tolower(ch[i]);
            }
        }
         printf("%c", ch[i])
        i += 1;
    }
 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:29: error: expected ';' before 'i'
   22 |          printf("%c", ch[i])
      |                             ^
      |                             ;
   23 |         i += 1;
      |         ~
Language: C++

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

int main(){
    int i = 0;
    char ch[1200];
    while(i < 1200){

        scanf("%c", &ch[i]);
        if(ch[i] == '\n'){
            break;
        } else if(isalpha(ch[i])){
            if (islower(ch[i])){
                ch[i] = toupper(ch[i]);
            
            }else if(isupper(ch[i])){
                ch[i] = tolower(ch[i]);
            }
        }
         printf("%c", ch[i])
        i++;
    }
 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:29: error: expected ';' before 'i'
   22 |          printf("%c", ch[i])
      |                             ^
      |                             ;
   23 |         i++;
      |         ~
Language: C++

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

int main(){
    int i = 0;
    char ch[1200];
    while(i < 1200){

        scanf("%c", &ch[i]);
        if(ch[i] == '\n'){
            break;
        } else if(isalpha(ch[i])){
            if (islower(ch[i])){
                ch[i] = toupper(ch[i]);
            
            }else if(isupper(ch[i])){
                ch[i] = tolower(ch[i]);
            }
        }
         printf("%c", ch[i])
         i = i + 1;
    }
 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:29: error: expected ';' before 'i'
   22 |          printf("%c", ch[i])
      |                             ^
      |                             ;
   23 |          i = i + 1;
      |          ~
Language: C++

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

int main(){
    int i = 0;
    char ch[1200];
    while(++i < 1200){

        scanf("%c", &ch[i]);
        if(ch[i] == '\n'){
            break;
        } else if(isalpha(ch[i])){
            if (islower(ch[i])){
                ch[i] = toupper(ch[i]);
            
            }else if(isupper(ch[i])){
                ch[i] = tolower(ch[i]);
            }
        }
         printf("%c", ch[i])
    
    }
 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:29: error: expected ';' before '}' token
   22 |          printf("%c", ch[i])
      |                             ^
      |                             ;
   23 | 
   24 |     }
      |     ~
Language: C++

# include<iostream>
using namespace std;
int mian() {
    string str;
    while (cin >> str) {
        for (int i=0;i<str.size();i++) {
            if (isalpha(ch)) {
                if (isupper(ch)) {
                    ch = tolower(ch);
                } else {
                    ch = toupper(ch);
                }
                cout << ch;
            }
            cout << ch;
        }
        cout << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int mian()':
a.cc:7:25: error: 'ch' was not declared in this scope
    7 |             if (isalpha(ch)) {
      |                         ^~
a.cc:15:21: error: 'ch' was not declared in this scope
   15 |             cout << ch;
      |                     ^~
Language: C++

# include<iostream>
using namespace std;
int mian() {
    string str;
    while (cin >> str) {
        for (int i=0;i<str.size();i++) {
            char ch = str[i];
            if (isalpha(ch)) {
                if (isupper(ch)) {
                    ch = tolower(ch);
                } else {
                    ch = toupper(ch);
                }
                cout << ch;
            }
            cout << ch;
        }
        cout << endl;
    }
    return 0;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

# include<iostream>
using namespace std;
int main() {
    char str[];
    char ch;
    while (cin >> str) {
        for (int i=0;i<str.size();i++) {
            ch = str[i];
            if (isalpha(ch)) {
                if (isupper(ch)) {
                    ch = tolower(ch);
                } else {
                    ch = toupper(ch);
                }
                cout << ch;
            } else {
                cout << ch;
            }
        }
        if (ch != '.') {
            cout << " ";
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: storage size of 'str' isn't known
    4 |     char str[];
      |          ^~~
Language: C++

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

int main() {

	char ch[2000];
	scanf("%[^\n]", ch);
	for (int i = 0; ch[i] != '\0'; i++) {
		char c = ch[i];
		if ('a' <= c && c <= 'z') {
			printf("%c", toupper(c));
		}
		else if ('A' <= c && c <= 'Z') {
			printf("%c", tolower(c));
		}
		else {
			printf("%c",c);
		}
	}printf("\n")
		return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:22: error: expected ';' before 'return'
   21 |         }printf("\n")
      |                      ^
      |                      ;
   22 |                 return 0;
      |                 ~~~~~~
Language: C++

#include <iostream>
#include<cstdio>
#include<conio.h>
#include<string.h>

using namespace std;

int main()
{
    char c[1200];
    cin.getline(c,sizeof(c));
    
    for(int i=0;c[i]!='.';i++){
        if(islower(c[i])){
            putchar(toupper(c[i]));
        }else if(isupper(c[i])){
            putchar(toupper(c[i]));
        }else{
            cout<<" ";
        }
        
    }

    cout<<"."<<endl;
}



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

#include <iostream>
#include<cstdio>

#include<string.h>

using namespace std;

int main()
{
    char c[1200];
    cin.getline(c,sizeof(c));
    
    for(int i=0;c[i]!='.';i++){
        if(islower(c[i])){
            putchar(toupper(c[i]));
        }else if(isupper(c[i])){
            putchar(toupper(c[i]));
        }else if(c[i]=","){
            cout<<",";
        }
        else{
            cout<<" ";
        }
        
    }

    cout<<"."<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:23: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   18 |         }else if(c[i]=","){
      |                       ^~~
      |                       |
      |                       const char*
Language: C++

#include<cstdio>;
//入出力を行う関数が使える//(scanf,printf)
#include<cctype>;
//文字の種類の判定や文字の変換を行う関数を使うことができる//

int main(){
    char ch;
    
    while(true){
        scanf("%c",&c);
        //文字（1文字）として入力する//
        if (isalpha(ch)){
            //chがアルファベットならtrueを返す//
            if(islower(ch)) printf("%c",toupper(ch));
            //chが小文字ならtrueを返す// //chの大文字を返す//
            else printf("%c", tolower(ch));
            //chの小文字を返す//
        } else printf("%c",ch);
        //アルファベット以外はそのまま出力//
        
        if (ch == '\n') break;
        //終端文字が現れたら終了//
    }
    return 0;
}


Compiler output:
a.cc:1:17: warning: extra tokens at end of #include directive
    1 | #include<cstdio>;
      |                 ^
a.cc:3:17: warning: extra tokens at end of #include directive
    3 | #include<cctype>;
      |                 ^
a.cc: In function 'int main()':
a.cc:10:21: error: 'c' was not declared in this scope; did you mean 'ch'?
   10 |         scanf("%c",&c);
      |                     ^
      |                     ch
Language: C++

#include<cstdio>;
//入出力を行う関数が使える//(scanf,printf)
#include<cctype>;
//文字の種類の判定や文字の変換を行う関数を使うことができる//

int main(){
    char ch[100];
    
    while(true){
        scanf("%c",&ch);
        //文字（1文字）として入力する//
        if (isalpha(ch)){
            //chがアルファベットならtrueを返す//
            if(islower(ch)) printf("%c",toupper(ch));
            //chが小文字ならtrueを返す// //chの大文字を返す//
            else printf("%c", tolower(ch));
            //chの小文字を返す//
        } else printf("%c",ch);
        //アルファベット以外はそのまま出力//
        
        if (ch == '\n') break;
        //終端文字が現れたら終了//
    }
    return 0;
}


Compiler output:
a.cc:1:17: warning: extra tokens at end of #include directive
    1 | #include<cstdio>;
      |                 ^
a.cc:3:17: warning: extra tokens at end of #include directive
    3 | #include<cctype>;
      |                 ^
a.cc: In function 'int main()':
a.cc:12:21: error: invalid conversion from 'char*' to 'int' [-fpermissive]
   12 |         if (isalpha(ch)){
      |                     ^~
      |                     |
      |                     char*
In file included from /usr/include/c++/14/cctype:42,
                 from a.cc:3:
/usr/include/ctype.h:109:1: note:   initializing argument 1 of 'int isalpha(int)'
  109 | __exctype (isalpha);
      | ^~~~~~~~~
a.cc:14:24: error: invalid conversion from 'char*' to 'int' [-fpermissive]
   14 |             if(islower(ch)) printf("%c",toupper(ch));
      |                        ^~
      |                        |
      |                        char*
/usr/include/ctype.h:112:1: note:   initializing argument 1 of 'int islower(int)'
  112 | __exctype (islower);
      | ^~~~~~~~~
a.cc:14:49: error: invalid conversion from 'char*' to 'int' [-fpermissive]
   14 |             if(islower(ch)) printf("%c",toupper(ch));
      |                                                 ^~
      |                                                 |
      |                                                 char*
/usr/include/ctype.h:125:25: note:   initializing argument 1 of 'int toupper(int)'
  125 | extern int toupper (int __c) __THROW;
      |                     ~~~~^~~
a.cc:16:39: error: invalid conversion from 'char*' to 'int' [-fpermissive]
   16 |             else printf("%c", tolower(ch));
      |                                       ^~
      |                                       |
      |                                       char*
/usr/include/ctype.h:122:25: note:   initializing argument 1 of 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
a.cc:21:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |         if (ch == '\n') break;
      |             ~~~^~~~~~~
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: expected initializer before '(' token
   10 |         if (int islower(ch) == true) cout << int toupper(ch);
      |                        ^
a.cc:10:24: error: expected ')' before '(' token
   10 |         if (int islower(ch) == true) cout << int toupper(ch);
      |            ~           ^
      |                        )
a.cc:10:46: error: expected primary-expression before 'int'
   10 |         if (int islower(ch) == true) cout << int toupper(ch);
      |                                              ^~~
a.cc:11:29: error: expected initializer before '(' token
   11 |         else if (int isupper(ch) == true) cout << int tolower(ch);
      |                             ^
a.cc:11:29: error: expected ')' before '(' token
   11 |         else if (int isupper(ch) == true) cout << int tolower(ch);
      |                 ~           ^
      |                             )
a.cc:11:51: error: expected primary-expression before 'int'
   11 |         else if (int isupper(ch) == true) cout << int tolower(ch);
      |                                                   ^~~
a.cc:13:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |         if (ch == "\n") break;
      |             ~~~^~~~~~~
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: expected initializer before '(' token
   11 |         if (int islower(ch) == true) cout << int toupper(ch);
      |                        ^
a.cc:11:24: error: expected ')' before '(' token
   11 |         if (int islower(ch) == true) cout << int toupper(ch);
      |            ~           ^
      |                        )
a.cc:11:46: error: expected primary-expression before 'int'
   11 |         if (int islower(ch) == true) cout << int toupper(ch);
      |                                              ^~~
a.cc:12:29: error: expected initializer before '(' token
   12 |         else if (int isupper(ch) == true) cout << int tolower(ch);
      |                             ^
a.cc:12:29: error: expected ')' before '(' token
   12 |         else if (int isupper(ch) == true) cout << int tolower(ch);
      |                 ~           ^
      |                             )
a.cc:12:51: error: expected primary-expression before 'int'
   12 |         else if (int isupper(ch) == true) cout << int tolower(ch);
      |                                                   ^~~
a.cc:14:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |         if (ch == "\n") break;
      |             ~~~^~~~~~~
Language: C++

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

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


Compiler output:
a.cc:15:19: error: empty character constant
   15 |         if (ch == ''\n') break;
      |                   ^~
a.cc:15:21: error: stray '\' in program
   15 |         if (ch == ''\n') break;
      |                     ^
a.cc:15:23: warning: missing terminating ' character
   15 |         if (ch == ''\n') break;
      |                       ^
a.cc:15:23: error: missing terminating ' character
   15 |         if (ch == ''\n') break;
      |                       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:12:24: error: expected initializer before '(' token
   12 |         if (int islower(ch) == true) cout << int toupper(ch);
      |                        ^
a.cc:12:24: error: expected ')' before '(' token
   12 |         if (int islower(ch) == true) cout << int toupper(ch);
      |            ~           ^
      |                        )
a.cc:12:46: error: expected primary-expression before 'int'
   12 |         if (int islower(ch) == true) cout << int toupper(ch);
      |                                              ^~~
a.cc:13:29: error: expected initializer before '(' token
   13 |         else if (int isupper(ch) == true) cout << int tolower(ch);
      |                             ^
a.cc:13:29: error: expected ')' before '(' token
   13 |         else if (int isupper(ch) == true) cout << int tolower(ch);
      |                 ~           ^
      |                             )
a.cc:13:51: error: expected primary-expression before 'int'
   13 |         else if (int isupper(ch) == true) cout << int tolower(ch);
      |                                                   ^~~
a.cc:15:21: error: expected ')' before 'n'
   15 |         if (ch == ''\n') break;
      |            ~        ^~
      |                     )
a.cc:16:5: error: expected primary-expression before '}' token
   16 |     }
      |     ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: expected initializer before '(' token
   12 |         if (int islower(ch) == true) cout << int toupper(ch);
      |                        ^
a.cc:12:24: error: expected ')' before '(' token
   12 |         if (int islower(ch) == true) cout << int toupper(ch);
      |            ~           ^
      |                        )
a.cc:12:46: error: expected primary-expression before 'int'
   12 |         if (int islower(ch) == true) cout << int toupper(ch);
      |                                              ^~~
a.cc:13:29: error: expected initializer before '(' token
   13 |         else if (int isupper(ch) == true) cout << int tolower(ch);
      |                             ^
a.cc:13:29: error: expected ')' before '(' token
   13 |         else if (int isupper(ch) == true) cout << int tolower(ch);
      |                 ~           ^
      |                             )
a.cc:13:51: error: expected primary-expression before 'int'
   13 |         else if (int isupper(ch) == true) cout << int tolower(ch);
      |                                                   ^~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:51: error: 'tupper' was not declared in this scope; did you mean 'toupper'?
   12 |             if (islower(ch) == true) printf("%c", tupper(ch));
      |                                                   ^~~~~~
      |                                                   toupper
Language: C++

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


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

# include<iostream>
# include<stdio.h>
using namespace std;
int main() {
    char ch;
    int i = 0;
    while (i < 1200) {
        scanf(%c,&ch);
        if (isalpha(ch)) {
            if (isupper(ch)) {
                ch = tolower(ch);
            } else {
                ch = toupper(ch);
            }
            cout << ch;
        } else {
            cout << ch;
            if (ch != '.') {
                cout << " ";
            }
        }
        i++;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected primary-expression before '%' token
    8 |         scanf(%c,&ch);
      |               ^
a.cc:8:16: error: 'c' was not declared in this scope
    8 |         scanf(%c,&ch);
      |                ^
Language: C++

# include<iostream>
# include<stdio.h>
using namespace std;
int main() {
    char ch;
    int i = 0;
    while (i < 1300) {
        scanf("%c",&ch);
        if (ch == '.') {
            cout << ch;
            break;
        }
        if (isalpha(ch)) {
            if (isupper(ch)) {
                ch = tolower(ch);
            } else {
                ch = toupper(ch);
            }
            cout << ch;
        } else {
            cout << ch << " ";
            }
        }
        i++;
    }
    return 0;
}


Compiler output:
a.cc:26:5: error: expected unqualified-id before 'return'
   26 |     return 0;
      |     ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include<iostream>
#include<cctype>
#include<cstdio>
using namespace std;
int main(){
    char ch;
    while(1){
        scanf("%c",&ch);
        if(ch == '\n') break;
        else if(isalpha(ch)){
            if(isupper(ch)) prinf("%c",tolower(ch));
            else prinf("%c",toupper(ch));
        }
        else printf("%c",ch);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: 'prinf' was not declared in this scope; did you mean 'printf'?
   11 |             if(isupper(ch)) prinf("%c",tolower(ch));
      |                             ^~~~~
      |                             printf
a.cc:12:18: error: 'prinf' was not declared in this scope; did you mean 'printf'?
   12 |             else prinf("%c",toupper(ch));
      |                  ^~~~~
      |                  printf
Language: C++

#include<iostream>
#include<cctype>
#include<cstdio>
using namespace std;
int main(){
    char ch;
    while(1){
        scanf("%c",&ch);
        if(ch == '\n') break;
        else if(isalpha(ch)){
            if(isupper(ch)) prinf("%c",tolower(ch));
            else printf("%c",toupper(ch));
        }
        else printf("%c",ch);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: 'prinf' was not declared in this scope; did you mean 'printf'?
   11 |             if(isupper(ch)) prinf("%c",tolower(ch));
      |                             ^~~~~
      |                             printf
Language: C++

#include<iostream>
#include<cctype>
#include<cstdio>
using namespace std;
int main() {
	char ch;

	while (1) {
		scanf_s("%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;
	}

	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<iostream>
#include<cctype>

using namespace std;

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



Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: condition declares a function
   11 |         if(int isalpha(char w)){
      |                ^~~~~~~
a.cc:12:20: error: condition declares a function
   12 |             if(int islower(char w)){
      |                    ^~~~~~~
a.cc:13:23: error: expected primary-expression before 'int'
   13 |                 cout<<int toupper(char w);
      |                       ^~~
a.cc:15:20: error: condition declares a function
   15 |             if(int isupper(char w)){
      |                    ^~~~~~~
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(char w)=="true"){
            if(int islower(char w)=="true"){
                cout<<int toupper(char w);
            }
            if(int isupper(char w)=="true"){
                cout<<int tolower(char w);
            }
        }
        else{
            cout<<w;
        }
    }
}



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