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

#include <bits/stdc++.h>
using namespace std;
int main{
  char b;
  char ans;
  cin >> b;
  if (b=='A') ans = 'T';
  else if (b == 'C') ans = 'G';
  else if (b == 'G') ans = 'C';
  else ans = 'A';
  cout << ans <<endl
}


Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:3: error: expected primary-expression before 'char'
    4 |   char b;
      |   ^~~~
a.cc:4:3: error: expected '}' before 'char'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin >> b;
      |   ^~~
a.cc:7:3: error: expected unqualified-id before 'if'
    7 |   if (b=='A') ans = 'T';
      |   ^~
a.cc:8:3: error: expected unqualified-id before 'else'
    8 |   else if (b == 'C') ans = 'G';
      |   ^~~~
a.cc:9:3: error: expected unqualified-id before 'else'
    9 |   else if (b == 'G') ans = 'C';
      |   ^~~~
a.cc:10:3: error: expected unqualified-id before 'else'
   10 |   else ans = 'A';
      |   ^~~~
a.cc:11:3: error: 'cout' does not name a type
   11 |   cout << ans <<endl
      |   ^~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
main{
  char b;
  char ans;
  cin >> b;
  if (b=='A') ans = 'T';
  else if (b == 'C') ans = 'G';
  else if (b == 'G') ans = 'C';
  else ans = 'A';
  cout << ans <<endl
}

Compiler output:
a.cc:3:1: error: 'main' does not name a type
    3 | main{
      | ^~~~
Language: C

#include <stdio.h>
int main(void){
    // Your code here!
    char b;
    scanf("%c",&b);
    switch(b){
        case 'A':
        printf("T");
        break;
        case 'T'
        printf("A");
        break;
        case 'C':
        printf("G");
        break;
        case 'G':
        printf("C");
        break;
    }
}


Compiler output:
main.c: In function 'main':
main.c:11:9: error: expected ':' or '...' before 'printf'
   11 |         printf("A");
      |         ^~~~~~
Language: C++

#include <stdio.h>
int main(void){
    // Your code here!
    char b;
    scanf("%c",&b);
    switch(b){
        case A:printf("T");
        case T:printf("A");
        case C:printf("G");
        case G:printf("C");
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'A' was not declared in this scope
    7 |         case A:printf("T");
      |              ^
a.cc:8:14: error: 'T' was not declared in this scope
    8 |         case T:printf("A");
      |              ^
a.cc:9:14: error: 'C' was not declared in this scope
    9 |         case C:printf("G");
      |              ^
a.cc:10:14: error: 'G' was not declared in this scope
   10 |         case G:printf("C");
      |              ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  
  char b;
  
  cin >> b
    switch(b){
        case 'A':
  		    cout << "T";
            break;

        case 'T':
  		    cout << "A";
            break;
        case 'C':
  		    cout << "G";
            break;
        case 'G':
  		    cout << "C";
        break;
        
    }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected ';' before 'switch'
    8 |   cin >> b
      |           ^
      |           ;
    9 |     switch(b){
      |     ~~~~~~
Language: C++

int main(void){
    // Your code here!
    char b ;
     int A,C,G,T;
   
    scanf("%c",&b);
    if (b=='A'){
        printf("T");
    }
    else if (b=='T'){
        printf("A");
    }
    else if(b=='C'){
        printf("G");
    }
    else if(b=='G'){
       printf("C");
    }
    else {
        printf("");
    }
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'scanf' was not declared in this scope
    6 |     scanf("%c",&b);
      |     ^~~~~
a.cc:8:9: error: 'printf' was not declared in this scope
    8 |         printf("T");
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void){
a.cc:11:9: error: 'printf' was not declared in this scope
   11 |         printf("A");
      |         ^~~~~~
a.cc:11:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:14:9: error: 'printf' was not declared in this scope
   14 |         printf("G");
      |         ^~~~~~
a.cc:14:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:17:8: error: 'printf' was not declared in this scope
   17 |        printf("C");
      |        ^~~~~~
a.cc:17:8: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:20:9: error: 'printf' was not declared in this scope
   20 |         printf("");
      |         ^~~~~~
a.cc:20:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

int main(void){
    // Your code here!
    char b ;
     int A,C,G,T;
   
    scanf("%c",&b);
    if (b=='A'){
        printf("T");
    }
    else if (b=='T'){
        printf("A");
    }
    else if(b=='C'){
        printf("G");
    }
    else if(b=='T'){
       printf("G");
    }
    else {
        printf("");
    }
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'scanf' was not declared in this scope
    6 |     scanf("%c",&b);
      |     ^~~~~
a.cc:8:9: error: 'printf' was not declared in this scope
    8 |         printf("T");
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void){
a.cc:11:9: error: 'printf' was not declared in this scope
   11 |         printf("A");
      |         ^~~~~~
a.cc:11:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:14:9: error: 'printf' was not declared in this scope
   14 |         printf("G");
      |         ^~~~~~
a.cc:14:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:17:8: error: 'printf' was not declared in this scope
   17 |        printf("G");
      |        ^~~~~~
a.cc:17:8: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:20:9: error: 'printf' was not declared in this scope
   20 |         printf("");
      |         ^~~~~~
a.cc:20:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

int main(void){
    // Your code here!
    char b ;
     char A='A';
     char C='C';
     char G='G';
     char T='T';
   
    scanf("%s",b);
    if (b=='A'){
        printf("T");
    }
    else if (b=='T'){
        printf("A");
    }
    else if(b=='C'){
        printf("G");
    }
    else if(b=='T'){
        printf("C");
    }
    else {
        printf("");
    }
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'scanf' was not declared in this scope
    9 |     scanf("%s",b);
      |     ^~~~~
a.cc:11:9: error: 'printf' was not declared in this scope
   11 |         printf("T");
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void){
a.cc:14:9: error: 'printf' was not declared in this scope
   14 |         printf("A");
      |         ^~~~~~
a.cc:14:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:17:9: error: 'printf' was not declared in this scope
   17 |         printf("G");
      |         ^~~~~~
a.cc:17:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:20:9: error: 'printf' was not declared in this scope
   20 |         printf("C");
      |         ^~~~~~
a.cc:20:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:23:9: error: 'printf' was not declared in this scope
   23 |         printf("");
      |         ^~~~~~
a.cc:23:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  stirng b;
  cin >> b;
  
  if(b == "A"){
    cout << "T" << endl;
  }
  if(b == "T"){
    cout << "A" << endl;
  }
  if(b == "G"){
    cout << "C" << endl;
  }
  if(b == "C"){
    cout << "G" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'stirng' was not declared in this scope
    5 |   stirng b;
      |   ^~~~~~
a.cc:6:10: error: 'b' was not declared in this scope
    6 |   cin >> b;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  stirng b;
  cin >> b;
  
  if(b == "A"){
    cout << T;
  }
  if(b == "T"){
    cout << A;
  }
  if(b == "G"){
    cout << C;
  }
  if(b == "C"){
    cout << G;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'stirng' was not declared in this scope
    5 |   stirng b;
      |   ^~~~~~
a.cc:6:10: error: 'b' was not declared in this scope
    6 |   cin >> b;
      |          ^
a.cc:9:13: error: 'T' was not declared in this scope
    9 |     cout << T;
      |             ^
a.cc:12:13: error: 'A' was not declared in this scope
   12 |     cout << A;
      |             ^
a.cc:15:13: error: 'C' was not declared in this scope
   15 |     cout << C;
      |             ^
a.cc:18:13: error: 'G' was not declared in this scope
   18 |     cout << G;
      |             ^
a.cc:19:4: error: expected '}' at end of input
   19 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++


int main(){
    char b;

    string res;

    cin >> b;

    if(b == 'A' ) res = "T";
    else if(b == 'C')res = "G";
    else if(b == 'G')res = "C";
    else res = "A";

    cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string res;
      |     ^~~~~~
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> b;
      |     ^~~
a.cc:9:19: error: 'res' was not declared in this scope
    9 |     if(b == 'A' ) res = "T";
      |                   ^~~
a.cc:10:22: error: 'res' was not declared in this scope
   10 |     else if(b == 'C')res = "G";
      |                      ^~~
a.cc:11:22: error: 'res' was not declared in this scope
   11 |     else if(b == 'G')res = "C";
      |                      ^~~
a.cc:12:10: error: 'res' was not declared in this scope
   12 |     else res = "A";
      |          ^~~
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << res << endl;
      |     ^~~~
a.cc:14:13: error: 'res' was not declared in this scope
   14 |     cout << res << endl;
      |             ^~~
a.cc:14:20: error: 'endl' was not declared in this scope
   14 |     cout << res << endl;
      |                    ^~~~
Language: C++

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

int search_AC(int b, int e, string s){
    string str = s.substr(b, e);
    int AC = count(str.begin(), str.end(), "AC");
    return AC;
}

int main() {
    int n, q;
    cin >> n >> q;
    string s;
    cin >> s;
    int l[q], r[q];
    int ans[q];

    for(int i = 0; i < q; i++){
        cin >> l[i] >> r[i];
        ans[i] = search_AC(l[i], r[i], s);
        printf("%d\n", ans[i]);
    }
    
    return (0);
}

Compiler output:
In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
                 from /usr/include/c++/14/string:51,
                 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/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_equals_val<_Value>::operator()(_Iterator) [with _Iterator = __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >; _Value = const char [3]]':
/usr/include/c++/14/bits/stl_algobase.h:2163:12:   required from 'typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::__count_if(_InputIterator, _InputIterator, _Predicate) [with _InputIterator = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >; _Predicate = __gnu_cxx::__ops::_Iter_equals_val<const char [3]>; typename iterator_traits< <template-parameter-1-1> >::difference_type = long int]'
 2163 |         if (__pred(__first))
      |             ~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4033:29:   required from 'typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&) [with _IIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >; _Tp = char [3]; typename iterator_traits< <template-parameter-1-1> >::difference_type = long int]'
 4033 |       return std::__count_if(__first, __last,
      |              ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
 4034 |                              __gnu_cxx::__ops::__iter_equals_val(__value));
      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:7:19:   required from here
    7 |     int AC = count(str.begin(), str.end(), "AC");
      |              ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/predefined_ops.h:270:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  270 |         { return *__it == _M_value; }
      |                  ~~~~~~^~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std; 
#define ll long long int
#define pb push_back
#define mp make_pair
#define pll pair<ll,ll>
#define INF LLONG_MAX
#define PI acos(-1)
#define MOD 1e9 + 7
#define N 1e5 + 10
struct dish
{
	ll rem,t;
};
bool cmp(dish a,dish b)
{
	return(a.rem>b.rem);
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	char x;
	cin>>x;
	if(x=='A')
		cout<<"T";
	if(x=='T')
		cout<<"A";
	if(x=="C")
		cout<<"G";
	if(x=="G")
		cout<<"C";
}	

Compiler output:
a.cc: In function 'int main()':
a.cc:30:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   30 |         if(x=="C")
      |            ~^~~~~
a.cc:32:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   32 |         if(x=="G")
      |            ~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string b;
  cin >> b
  if(b == "A"){
    cout << T << endl;
  }
  if(b == "T"){
    cout << A << endl;
  }
  if(b == "G"){
    cout << C << endl;
  }
  if(b == "C"){
    cout << G << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: expected ';' before 'if'
    6 |   cin >> b
      |           ^
      |           ;
    7 |   if(b == "A"){
      |   ~~       
a.cc:11:13: error: 'A' was not declared in this scope
   11 |     cout << A << endl;
      |             ^
a.cc:14:13: error: 'C' was not declared in this scope
   14 |     cout << C << endl;
      |             ^
a.cc:17:13: error: 'G' was not declared in this scope
   17 |     cout << G << endl;
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string b;
  cin >> b
  if(b == A){
    cout << T << endl;
  }
  if(b == T){
    cout << A << endl;
  }
  if(b == G){
    cout << C << endl;
  }
  if(b == C){
    cout << G << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: expected ';' before 'if'
    6 |   cin >> b
      |           ^
      |           ;
    7 |   if(b == A){
      |   ~~       
a.cc:10:11: error: 'T' was not declared in this scope
   10 |   if(b == T){
      |           ^
a.cc:11:13: error: 'A' was not declared in this scope
   11 |     cout << A << endl;
      |             ^
a.cc:13:11: error: 'G' was not declared in this scope
   13 |   if(b == G){
      |           ^
a.cc:14:13: error: 'C' was not declared in this scope
   14 |     cout << C << endl;
      |             ^
a.cc:16:11: error: 'C' was not declared in this scope
   16 |   if(b == C){
      |           ^
a.cc:17:13: error: 'G' was not declared in this scope
   17 |     cout << G << endl;
      |             ^
Language: C++

int main() {
  string b;
  cin >> b
  if(b == A){
    cout << T << endl;
  }
  if(b == T){
    cout << A << endl;
  }
  if(b == G){
    cout << C << endl;
  }
  if(b == C){
    cout << G << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
    2 |   string b;
      |   ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> b
      |   ^~~
a.cc:3:10: error: 'b' was not declared in this scope
    3 |   cin >> b
      |          ^
a.cc:7:11: error: 'T' was not declared in this scope
    7 |   if(b == T){
      |           ^
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << A << endl;
      |     ^~~~
a.cc:8:13: error: 'A' was not declared in this scope
    8 |     cout << A << endl;
      |             ^
a.cc:8:18: error: 'endl' was not declared in this scope
    8 |     cout << A << endl;
      |                  ^~~~
a.cc:10:11: error: 'G' was not declared in this scope
   10 |   if(b == G){
      |           ^
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << C << endl;
      |     ^~~~
a.cc:11:13: error: 'C' was not declared in this scope
   11 |     cout << C << endl;
      |             ^
a.cc:11:18: error: 'endl' was not declared in this scope
   11 |     cout << C << endl;
      |                  ^~~~
a.cc:13:11: error: 'C' was not declared in this scope
   13 |   if(b == C){
      |           ^
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << G << endl;
      |     ^~~~
a.cc:14:13: error: 'G' was not declared in this scope
   14 |     cout << G << endl;
      |             ^
a.cc:14:18: error: 'endl' was not declared in this scope
   14 |     cout << G << endl;
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string == b;
  cin >> b
  if(b == A){
    cout << T << endl;
  }
  if(b == T){
    cout << A << endl;
  }
  if(b == G){
    cout << C << endl;
  }
  if(b == C){
    cout << G << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected unqualified-id before '==' token
    5 |   string == b;
      |          ^~
a.cc:6:10: error: 'b' was not declared in this scope
    6 |   cin >> b
      |          ^
a.cc:10:11: error: 'T' was not declared in this scope
   10 |   if(b == T){
      |           ^
a.cc:11:13: error: 'A' was not declared in this scope
   11 |     cout << A << endl;
      |             ^
a.cc:13:11: error: 'G' was not declared in this scope
   13 |   if(b == G){
      |           ^
a.cc:14:13: error: 'C' was not declared in this scope
   14 |     cout << C << endl;
      |             ^
a.cc:16:11: error: 'C' was not declared in this scope
   16 |   if(b == C){
      |           ^
a.cc:17:13: error: 'G' was not declared in this scope
   17 |     cout << G << endl;
      |             ^
Language: C++

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

int main() {
  string = b;
  cin >> b
  if(b = A){
    cout << T << endl;
  }
  if(b = T){
    cout << A << endl;
  }
  if(b = G){
    cout << C << endl;
  }
  if(b = C){
    cout << G << endl;
  }
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected unqualified-id before '=' token
    5 |   string = b;
      |          ^
a.cc:6:10: error: 'b' was not declared in this scope
    6 |   cin >> b
      |          ^
a.cc:10:10: error: 'T' was not declared in this scope
   10 |   if(b = T){
      |          ^
a.cc:11:13: error: 'A' was not declared in this scope
   11 |     cout << A << endl;
      |             ^
a.cc:13:10: error: 'G' was not declared in this scope
   13 |   if(b = G){
      |          ^
a.cc:14:13: error: 'C' was not declared in this scope
   14 |     cout << C << endl;
      |             ^
a.cc:16:10: error: 'C' was not declared in this scope
   16 |   if(b = C){
      |          ^
a.cc:17:13: error: 'G' was not declared in this scope
   17 |     cout << G << endl;
      |             ^
Language: C

#include<stdio.h>
int main(void)
{
 int b,A,T,G,C,x;
 scanf("%d",&b);
  if(b==A)
  x=T
  if(b==T)
  x=A
  if(b==G)
   x=C
 if(b==C)
  x=G 
 printf("%d",X);
}

Compiler output:
main.c: In function 'main':
main.c:7:6: error: expected ';' before 'if'
    7 |   x=T
      |      ^
      |      ;
    8 |   if(b==T)
      |   ~~
Language: C

#include<stdio.h>
int main(void)
{
 int b,A,T,G,C
 scanf("%d",&b);
  if(b==A)
  x=T
  
  if(b==T)
  x=A
    
   if(b==G)
   x=C
  
 if(b==C)
  x=G
  
  
  
 printf("%d",X);
}

Compiler output:
main.c: In function 'main':
main.c:5:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    5 |  scanf("%d",&b);
      |  ^~~~~
main.c:7:3: error: 'x' undeclared (first use in this function)
    7 |   x=T
      |   ^
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:6: error: expected ';' before 'if'
    7 |   x=T
      |      ^
      |      ;
    8 | 
    9 |   if(b==T)
      |   ~~
Language: Java

import java.util.Scanner;


public class Sample001 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
        String input = sc.next();
        if(input.equals("A")){
            System.out.println("T");
        }else if(input.equals("T")){
            System.out.println("A");
        }else if(input.equals("C")){
            System.out.println("G");
        }else if(input.equals("G")){
            System.out.println("C");
        }
	}

}


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

import java.util.Scanner;

/**
 *
 */

/**
 * @author 19-0342
 *
 */
public class Sample001 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
        String input = sc.next();
        if(input.equals("A")){
            System.out.println("T");
        }else if(input.equals("T")){
            System.out.println("A");
        }else if(input.equals("C")){
            System.out.println("G");
        }else if(input.equals("G")){
            System.out.println("C");
        }
	}

}


Compiler output:
Main.java:11: error: class Sample001 is public, should be declared in a file named Sample001.java
public class Sample001 {
       ^
1 error
Language: C++

#include<iostream>
using namespace std;
int main(){
  int b;
  cin>>b;
  if(b="A"){
    cout<<"T"<<endl;
  }else if(b="T"){
    cout<<"A"<<endl;
  }else if(b="C"){
    cout<<"G"<<endl;
  }else if(b="G"){
    cout<<"C"<<endl;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    6 |   if(b="A"){
      |        ^~~
      |        |
      |        const char*
a.cc:8:14: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    8 |   }else if(b="T"){
      |              ^~~
      |              |
      |              const char*
a.cc:10:14: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   10 |   }else if(b="C"){
      |              ^~~
      |              |
      |              const char*
a.cc:12:14: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   12 |   }else if(b="G"){
      |              ^~~
      |              |
      |              const char*
Language: C++

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

int main() { 
	char b;
  cin >> b;
  if(b='A'){
  cout << T << endl;
  }else if(b='T'){
   cout << A << endl;
  }else if(b='G'){
   cout << C << endl;
  }else if(b='C'){
   cout << G << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'T' was not declared in this scope
    8 |   cout << T << endl;
      |           ^
a.cc:10:12: error: 'A' was not declared in this scope
   10 |    cout << A << endl;
      |            ^
a.cc:12:12: error: 'C' was not declared in this scope
   12 |    cout << C << endl;
      |            ^
a.cc:14:12: error: 'G' was not declared in this scope
   14 |    cout << G << endl;
      |            ^
Language: C++

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

char b;
cin >> 'b';

if (b == 'A')
{
    cout << 'T' << endl;
}

else if (b == 'T')
{
    cout << 'A' << endl;
}

else if (b == 'G')
{
    cout << 'C' << endl;
}

else if (b == 'C')
{
    cout << 'G' << endl;
}


Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin >> 'b';
      | ^~~
a.cc:7:1: error: expected unqualified-id before 'if'
    7 | if (b == 'A')
      | ^~
a.cc:12:1: error: expected unqualified-id before 'else'
   12 | else if (b == 'T')
      | ^~~~
a.cc:17:1: error: expected unqualified-id before 'else'
   17 | else if (b == 'G')
      | ^~~~
a.cc:22:1: error: expected unqualified-id before 'else'
   22 | else if (b == 'C')
      | ^~~~
Language: C++

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

int b;
cin >> b;

if (b == A)
{
    cout << "T" << endl;
}

else if (b == T)
{
    cout << "A" << endl;
}

else if (b == G)
{
    cout << "C" << endl;
}

else if (b == C)
{
    cout << "G" << endl;
}


Compiler output:
a.cc:1:2: error: extended character 　 is not valid in an identifier
    1 | #include　<bits/stdc++.h>
      |  ^
a.cc:1:2: error: invalid preprocessing directive #include\U00003000
    1 | #include　<bits/stdc++.h>
      |  ^~~~~~~~~
a.cc:5:1: error: 'cin' does not name a type
    5 | cin >> b;
      | ^~~
a.cc:7:1: error: expected unqualified-id before 'if'
    7 | if (b == A)
      | ^~
a.cc:12:1: error: expected unqualified-id before 'else'
   12 | else if (b == T)
      | ^~~~
a.cc:17:1: error: expected unqualified-id before 'else'
   17 | else if (b == G)
      | ^~~~
a.cc:22:1: error: expected unqualified-id before 'else'
   22 | else if (b == C)
      | ^~~~
Language: C++

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

string b;
cin >> b;

if (b == A)
{
    cout << "T" << endl;
}

else if (b == T)
{
    cout << "A" << endl;
}

else if (b == G)
{
    cout << "C" << endl;
}

else if (b == C)
{
    cout << "G" << endl;
}


Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin >> b;
      | ^~~
a.cc:7:1: error: expected unqualified-id before 'if'
    7 | if (b == A)
      | ^~
a.cc:12:1: error: expected unqualified-id before 'else'
   12 | else if (b == T)
      | ^~~~
a.cc:17:1: error: expected unqualified-id before 'else'
   17 | else if (b == G)
      | ^~~~
a.cc:22:1: error: expected unqualified-id before 'else'
   22 | else if (b == C)
      | ^~~~
Language: C++

#include <stdio.h>
using namespace std;
int main() {
	char b,c;
	cin >> b;

	switch (b) {
	  case 'A':
		  c = 'T';
		  break;
	  case 'T':
		  c = 'A';
		  break;
	  case 'C':
		  c = 'G';
		  break;
	  case　'G':
		  c = 'C';
		  break;
	}

	cout << c;
	return 0;
}

Compiler output:
a.cc:17:11: error: extended character 　 is not valid in an identifier
   17 |           case　'G':
      |           ^
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> b;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:17:11: error: 'case\U00003000' was not declared in this scope
   17 |           case　'G':
      |           ^~~~~~
a.cc:22:9: error: 'cout' was not declared in this scope
   22 |         cout << c;
      |         ^~~~
a.cc:22:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

include <iostream>
using namespace std;
int main(){
char a;
  cin>>a;
  char b;
  switch(a){
    case 'A': b = 'T';break;
    case 'C': b = 'G';break;
    case 'G': b = 'C';break;
    case 'T': b = 'A';break;}
  cout << b << endl;
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>a;
      |   ^~~
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout << b << endl;
      |   ^~~~
a.cc:12:16: error: 'endl' was not declared in this scope
   12 |   cout << b << endl;
      |                ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  char A, T, C, G, b;
  cin >> b;
  if ('b'=='A')
    cout << T << endl;
   else if ('b'=='T')
    cout << A << endl;
   else if ('b'=='C')
    cout << G << endl;
   else if ('b'=='G')
    cout << c << endl;
}

  


Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'c' was not declared in this scope
   14 |     cout << c << endl;
      |             ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  char A, T, C, G, b;
  cin >> b;
  if ('b'='A')
    cout << T << endl;
   else if ('b'='T')
    cout << A << endl;
   else if ('b'='C')
    cout << G << endl;
   else if ('b'='G')
    cout << c << endl;
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: lvalue required as left operand of assignment
    7 |   if ('b'='A')
      |       ^~~
a.cc:9:13: error: lvalue required as left operand of assignment
    9 |    else if ('b'='T')
      |             ^~~
a.cc:11:13: error: lvalue required as left operand of assignment
   11 |    else if ('b'='C')
      |             ^~~
a.cc:13:13: error: lvalue required as left operand of assignment
   13 |    else if ('b'='G')
      |             ^~~
a.cc:14:13: error: 'c' was not declared in this scope
   14 |     cout << c << endl;
      |             ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
 
int main(){
  string enki;
  
  cin >> enki;
  
  if(enki =="A"){
    cout<<"T"<<endl;
  }else if(enki =="T"){
        cout<<"A"<<endl;
  }else if(enki =="G"){
        cout<<"C"<<endl;
  }else if(enki =="C"){
        cout<<"G"<<endl;
  }
  return 0;
}
#include<iostream>
#include<string>

int main(){
  string enki;
  
  cin >> enki;
  
  if(enki =="A"){
    cout<<"T"<<endl;
  }else if(enki =="T"){
        cout<<"A"<<endl;
  }else if(enki =="G"){
        cout<<"C"<<endl;
  }else if(enki =="C"){
        cout<<"G"<<endl;
  }
  return 0;
}
提出情報

Compiler output:
a.cc:24:5: error: redefinition of 'int main()'
   24 | int main(){
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main(){
      |     ^~~~
a.cc:40:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
   40 | 提出情報
      | ^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string b,c;
  cin >> b;
  if (b=="A"){
    c="T";
  }
  else if (b=="T"){
    c="A";
  }
  else if (b=="C"){
    c="G";
  }
  else if (b=="G"){
    c="C";
  }
  cout >> C >> endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: 'C' was not declared in this scope
   18 |   cout >> C >> endl;
      |           ^
Language: C++

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

int mainn(){
  string X;
  cin >>X;
  if(X == "A"){
    cout<<"T"<<endl;
  }else if(X == "T"){
    cout<<"A"<<endl;
  }else if(X == "C"){
    cout<<"G"<<endl;
  }else{
    cout<<"C"<<endl;
  }
}
  

Compiler output:
a.cc: In function 'int mainn()':
a.cc:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
   16 | }
      | ^
/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 <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep1(i, n) for(int i = 1; i < n; i++)
#define all(v) (v).begin(), (v).end()
#define decimal fixed << setprecision(20)
#define fastcin() cin.tie(0);ios::sync_with_stdio(false)
using namespace std;
using LL = long long;
const int INF = 1e9;
const LL LLINF = 1e16;

int main(){
  char x;
  cin>>x;
  char ans='x';
  switch(x){
    case 'A':
    ans='T';
    break;
    case 'T':
    ans='A';
    break;
    case 'C':
    ans='G';
    break;
    case 'C':
    ans='G';
    break;
    }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:5: error: duplicate case value
   26 |     case 'C':
      |     ^~~~
a.cc:23:5: note: previously used here
   23 |     case 'C':
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep1(i, n) for(int i = 1; i < n; i++)
#define all(v) (v).begin(), (v).end()
#define decimal fixed << setprecision(20)
#define fastcin() cin.tie(0);ios::sync_with_stdio(false)
using namespace std;
using LL = long long;
const int INF = 1e9;
const LL LLINF = 1e16;

int main(){
  char x;
  cin>>x;
  char ans='x';
  switch(x){
    case 'A':
    ans='T';
    break;
    case 'T':
    ans='A';
    break;
    case 'C':
    ans='G';
    break;
    case 'T':
    ans='G';
    break;
    }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:5: error: duplicate case value
   26 |     case 'T':
      |     ^~~~
a.cc:20:5: note: previously used here
   20 |     case 'T':
      |     ^~~~
Language: C++

#include<stadio.h>
int main(void);{
char s[50];
scanf("%c",s);
if('A'==s[0]){
  puts("T");
}
else if('T'==s[0]){
   puts("A");
}
  else if('C'==s[0]){
   puts("G");
}
  else if('G'==s[0]){
   puts("C");
}
  return 0;
}



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

#include<stdio.h>
int main(void){
  char a;
  scanf("%s",&a);
  if(a=='A'){
    printf("T");
  }
  else if(a=='c'){
    printf("G");
  }
  else if(a=='T'){
    printf("A");
  }
  else if(a=='G'){
    printf("C");
  }  
  return 0;

Compiler output:
main.c: In function 'main':
main.c:17:3: error: expected declaration or statement at end of input
   17 |   return 0;
      |   ^~~~~~
Language: C

#include <stdio.h>
int main(){
  string b[1];
  scanf("%s",b);
  if(b[0]='A')
    printf("T");
   if(b[0]='T')
    printf("A");
   if(b[0]='G')
    printf("C");
   if(b[0]='C')
    printf("G");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:3: error: unknown type name 'string'; did you mean 'stdin'?
    3 |   string b[1];
      |   ^~~~~~
      |   stdin
Language: C

#include <stdio.h>
int main(){
  char b[1];
  scanf("%c",&b);
  if(char b[0]='A')
    printf("T");
   if(char b[0]='T')
    printf("A");
   if(char b[0]='G')
    printf("C");
   if(char b[0]='C')
    printf("G");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:6: error: expected expression before 'char'
    5 |   if(char b[0]='A')
      |      ^~~~
main.c:7:7: error: expected expression before 'char'
    7 |    if(char b[0]='T')
      |       ^~~~
main.c:9:7: error: expected expression before 'char'
    9 |    if(char b[0]='G')
      |       ^~~~
main.c:11:7: error: expected expression before 'char'
   11 |    if(char b[0]='C')
      |       ^~~~
Language: C

#include <stdio.h>
int main(){
  char b[1];
  scanf("%s",&b);
  if(char b[0]='A')
    printf("T");
   if(char b[0]='T')
    printf("A");
   if(char b[0]='G')
    printf("C");
   if(char b[0]='C')
    printf("G");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:6: error: expected expression before 'char'
    5 |   if(char b[0]='A')
      |      ^~~~
main.c:7:7: error: expected expression before 'char'
    7 |    if(char b[0]='T')
      |       ^~~~
main.c:9:7: error: expected expression before 'char'
    9 |    if(char b[0]='G')
      |       ^~~~
main.c:11:7: error: expected expression before 'char'
   11 |    if(char b[0]='C')
      |       ^~~~
Language: C++

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

int main(){
  char b;
  cin >> b;
  
  if(b=='A'){
    cout << 'T' << endl;
  }else if(b=='T'){
    cout << 'A' << endl;
  }else if(b=='G'){
    cout << 'C' << enl;
  }else{
    cout << 'G' << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: 'enl' was not declared in this scope; did you mean 'ynl'?
   13 |     cout << 'C' << enl;
      |                    ^~~
      |                    ynl
Language: C++

#include <iostream>

int main (){
    char b;
    std::cout << "b=\n";
    std::cin >> b;

    if (b== 'A'){
        std::cout << "T";
    } 
    else if (b== 'T'){
        std::cout << "A";
    }
    else if (b== 'G'){
        std::cout << "C";
    }
    else if {
        std::cout << "G";
    }
}

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

#include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for(int i = 0; i < (n); i++)
#define SORT(v, n) sort(v, v+n);
#define SSORT(v, n) sort(v, v+n, greater<int>())

int main(){
	int b;
	cin >> b;
	if(b == "A") cout << "T" << endl;
	else if(b == "T") cout << "A" << endl;
	else if(b == "G") cout << "C" << endl;
	else if(b == "C") cout << "G" << endl;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if(b == "A") cout << "T" << endl;
      |            ~~^~~~~~
a.cc:13:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |         else if(b == "T") cout << "A" << endl;
      |                 ~~^~~~~~
a.cc:14:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |         else if(b == "G") cout << "C" << endl;
      |                 ~~^~~~~~
a.cc:15:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |         else if(b == "C") cout << "G" << endl;
      |                 ~~^~~~~~
Language: C++

b=input()
base={"A":"T","T":"A","C":"G","G":"C"}
print(base[b])

Compiler output:
a.cc:1:1: error: 'b' does not name a type
    1 | b=input()
      | ^
a.cc:3:6: error: expected constructor, destructor, or type conversion before '(' token
    3 | print(base[b])
      |      ^
Language: Java

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

public class Main {
	public static void main(String[] args) throws IOException {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	String str = br.readLine();
    	if (str.equals("A")) {
    		System.out.println("T");
    	}
    	if (str.equals("T")) {
    		System.out.println("A");
    	}
    	if (str.equals("C")) {
    		System.out.println("G");
    	}
    	if (str.equals("G")) {
    		System.out.println("C");
    	}
    }
}

Compiler output:
Main.java:6: error: cannot find symbol
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	^
  symbol:   class BufferedReader
  location: class Main
Main.java:6: error: cannot find symbol
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	                        ^
  symbol:   class BufferedReader
  location: class Main
2 errors
Language: C

#include <stdio.h>
int main(){
    char b;
    scanf("%s",b);
    if(b = A){
        printf("T");
    }else if(b = T){
        printf("A");
    }else if(b = G){
        printf("C");
    }else if(b = C){
        printf("G");
    }
}

Compiler output:
main.c: In function 'main':
main.c:5:12: error: 'A' undeclared (first use in this function)
    5 |     if(b = A){
      |            ^
main.c:5:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:18: error: 'T' undeclared (first use in this function)
    7 |     }else if(b = T){
      |                  ^
main.c:9:18: error: 'G' undeclared (first use in this function)
    9 |     }else if(b = G){
      |                  ^
main.c:11:18: error: 'C' undeclared (first use in this function)
   11 |     }else if(b = C){
      |                  ^
Language: C++

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

int main() {
  
  string b;
  cin >> b;
  
  else if (b == "A") {
    cout << "T" << endl;
  }
  else if (b == "T") {
    cout << "A" << endl;
  }
  else if (b == "G") {
    cout << "c" << endl;
  }
  else {
    cout << "G" << endl;
  }
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else if (b == "A") {
      |   ^~~~
Language: C++

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

int main() {
  
  string b;
  cin >> b;
  
  if (b == "A") {
    cout << "T" << endl;
  }
  if else (b == "T") {
    cout << "A" << endl;
  }
  if else (b == "G") {
    cout << "c" << endl;
  }
  else {
    cout << "G" << endl;
  }
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:12:6: error: expected '(' before 'else'
   12 |   if else (b == "T") {
      |      ^~~~
      |      (
a.cc:15:6: error: expected '(' before 'else'
   15 |   if else (b == "G") {
      |      ^~~~
      |      (
a.cc:18:3: error: 'else' without a previous 'if'
   18 |   else {
      |   ^~~~
Language: C

#include<stdio.h>
int main()
{
    char b;
    scanf("%c",&b);
    if(b == 'A'){
        printf("T");
    }else if(b == 'T'){
        printf("A");
    }else if(b == 'C'){
        printf("G");
    }else(b == 'G'){
        printf("C");

    }
}

Compiler output:
main.c: In function 'main':
main.c:12:20: error: expected ';' before '{' token
   12 |     }else(b == 'G'){
      |                    ^
      |                    ;
Language: C

#include<stdio.h>
int main()
{
    char b;
    scanf("%c",b);
    if(b == 'A'){
        printf("T");
    }else if(b == 'T'){
        printf("A");
    }else if(b == 'C'){
        printf("G");
    }else(b == 'G'){
        printf("C");

    }
}

Compiler output:
main.c: In function 'main':
main.c:12:20: error: expected ';' before '{' token
   12 |     }else(b == 'G'){
      |                    ^
      |                    ;
Language: C

#include<stdio.h>
int main()
{
    int b
    scanf("%s",b);
    if(b = "A"){
        printf("T");
    }else if(b = "T"){
        printf("A");
    }else if(b = "C"){
        printf("G");
    }else(b = "G"){
        printf("C");

    }
}

Compiler output:
main.c: In function 'main':
main.c:5:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    5 |     scanf("%s",b);
      |     ^~~~~
main.c:5:16: error: 'b' undeclared (first use in this function)
    5 |     scanf("%s",b);
      |                ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:19: error: expected ';' before '{' token
   12 |     }else(b = "G"){
      |                   ^
      |                   ;
Language: C

#include<stdio.h>
int main()
{
    int b
    scanf("%s",b);
    if(b = A){
        printf("T");
    }else if(b = T){
        printf("A");
    }else if(b = C){
        printf("G");
    }else(b = G){
        printf("C");

    }
}

Compiler output:
main.c: In function 'main':
main.c:5:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    5 |     scanf("%s",b);
      |     ^~~~~
main.c:5:16: error: 'b' undeclared (first use in this function)
    5 |     scanf("%s",b);
      |                ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:12: error: 'A' undeclared (first use in this function)
    6 |     if(b = A){
      |            ^
main.c:8:18: error: 'T' undeclared (first use in this function)
    8 |     }else if(b = T){
      |                  ^
main.c:10:18: error: 'C' undeclared (first use in this function)
   10 |     }else if(b = C){
      |                  ^
main.c:12:15: error: 'G' undeclared (first use in this function)
   12 |     }else(b = G){
      |               ^
main.c:12:17: error: expected ';' before '{' token
   12 |     }else(b = G){
      |                 ^
      |                 ;
Language: C++

#include<iostream>
using namespace std;
int main(){
  int b;
  cin>>b;
  if(b=="G"){
    cout<<"C"<<endl;
  }
  if(b=="C"){
    cout<<"G"<<endl;
  }
  if(b=="A"){
    cout<<"T"<<endl;
  }
  if(b=="T"){
    cout<<"A"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |   if(b=="G"){
      |      ~^~~~~
a.cc:9:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(b=="C"){
      |      ~^~~~~
a.cc:12:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if(b=="A"){
      |      ~^~~~~
a.cc:15:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   if(b=="T"){
      |      ~^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a;
  cin>>a;
  if(a=="G"){
    cout<<"C"<<endl;
  }
  if(a=="C"){
    cout<<"G"<<endl;
  }
  if(a=="A"){
    cout<<"T"<<endl;
  }
  if(a=="T"){
    cout<<"A"<<endl;
  }
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |   if(a=="G"){
      |      ~^~~~~
a.cc:9:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(a=="C"){
      |      ~^~~~~
a.cc:12:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if(a=="A"){
      |      ~^~~~~
a.cc:15:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   if(a=="T"){
      |      ~^~~~~
Language: C

include <stdio.h>
int main(void){
    char b=0;
    b=getchar();
    if(b=='A')
    printf("T");
    else if(b=='T')
    printf("A");
    else if(b=='C')
    printf("G");
    else
    printf("C");
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C++

#include <iostream>
using namespace std;
int main() {
  int b;
  cin >> b;
  if(b=="A"){
    cout << "T" << endl;
  }
  if(b=="T"){
    cout << "A" << endl;
  }
  if(b=="C"){
    cout << "G" << endl;
  }
  if(b=="G"){
    cout << "C" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |   if(b=="A"){
      |      ~^~~~~
a.cc:9:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(b=="T"){
      |      ~^~~~~
a.cc:12:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if(b=="C"){
      |      ~^~~~~
a.cc:15:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   if(b=="G"){
      |      ~^~~~~
Language: C++

b = input()

if (b == 'A'):
    print('T')
elif (b == 'T'):
    print('A')
elif (b == 'C'):
    print('G')
else:
    print('C')


Compiler output:
a.cc:1:1: error: 'b' does not name a type
    1 | b = input()
      | ^