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

#include <iostream>
#include <string>

using namespace std;

#define rep(i,n) for(int (i)=1;(i)<=(n);(i)++)

int main(){
  char b;
  cin >> b;
  char s[4] = {'A','T','C','G'};
  if(b=='A')cout << s[1] << endl;
  else if(b=='T')cout << s[0] << endl;
  else if(b=='C')cout << s[3] << endl;
  else cout << s[2]
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: expected ';' before '}' token
   15 |   else cout << s[2]
      |                    ^
      |                    ;
   16 | }
      | ~
Language: C++

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

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"A"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    7 |     if(b = "A"){
      |        ~~^~~~~
      |          |
      |          std::__cxx11::basic_string<char>
a.cc:10:10: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"C"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   10 |     if(b = "C"){
      |        ~~^~~~~
      |          |
      |          std::__cxx11::basic_string<char>
a.cc:13:10: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"T"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |     if(b = "T"){
      |        ~~^~~~~
      |          |
      |          std::__cxx11::basic_string<char>
a.cc:16:10: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"G"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   16 |     if(b = "G"){
      |        ~~^~~~~
      |          |
      |          std::__cxx11::basic_string<char>
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String b = next();
    if(b.equals("A")){
      System.out.println("T");
    }else if(b.equals("T")){
      System.out.println("A");
    }else if(b.equals("C")){
      System.out.println("G");
    }else{
      System.out.println("C");
    }
  }
  

  
}

Compiler output:
Main.java:5: error: cannot find symbol
    String b = next();
               ^
  symbol:   method next()
  location: class Main
1 error
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:58: error: expected ':' before ')' token
    6 |   cout << (b=='A'?'C':(b=='C'?'A':(b=='G'?'T':(b=='T'?'G')))) << endl;
      |                                                          ^
      |                                                          :
a.cc:6:58: error: expected primary-expression before ')' token
Language: C++

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


Compiler output:
a.cc:15:9: error: expected unqualified-id before 'return'
   15 |         return 0;
      |         ^~~~~~
Language: C++

#include<bits/stdc++.h>
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(b=='G') cout<<'C'<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ';' before 'cout'
    8 |   else(b=='G') cout<<'C'<<endl;
      |               ^~~~~
      |               ;
Language: C++

# Your code here!
s=gets.chomp
if s=='A'
    puts 'T'
elsif s=='T'
    puts 'A'
elsif s=='G'
    puts 'C'
else
    puts 'G'
end

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #Your
    1 | # Your code here!
      |   ^~~~
a.cc:2:1: error: 's' does not name a type
    2 | s=gets.chomp
      | ^
Language: C++

# Your code here!
s=gets.chomp
if s=='A'
    puts 'T'
elsif s=='T'
    puts 'G'
elsif s=='G'
    puts 'T'
else
    puts 'G'
end

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #Your
    1 | # Your code here!
      |   ^~~~
a.cc:2:1: error: 's' does not name a type
    2 | s=gets.chomp
      | ^
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected primary-expression before ';' token
    7 |     cin >>b>>;
      |              ^
a.cc:8:11: error: 'A' was not declared in this scope
    8 |     if(b==A)
      |           ^
a.cc:10:16: error: 'T' was not declared in this scope
   10 |     else if(b==T)
      |                ^
a.cc:12:16: error: 'G' was not declared in this scope
   12 |     else if(b==G)
      |                ^
a.cc:14:16: error: 'C' was not declared in this scope
   14 |     else if(b==C)
      |                ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <tuple>
#include <bits/stdc++.h>
typedef long long ll;
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

//素因数分解
vector<pair<ll,int>> factorize(ll n){
    vector<pair<ll,int>>res;
    for(ll i=2;i*i<=n;i++){
        if(n%i)continue;
        res.emplace_back(i,0);
        while (n%i == 0)
        {
        n /= i;
        res.back().second++;
        }
        
    }
    if(n != 1) res.emplace_back(n,1);
    return res;
}

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


Compiler output:
a.cc: In function 'int main()':
a.cc:33:40: error: expected ';' before ':' token
   33 |     else if(s== 'C')cout << 'G' << endl:
      |                                        ^
      |                                        ;
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <tuple>
#include <bits/stdc++.h>
typedef long long ll;
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

//素因数分解
vector<pair<ll,int>> factorize(ll n){
    vector<pair<ll,int>>res;
    for(ll i=2;i*i<=n;i++){
        if(n%i)continue;
        res.emplace_back(i,0);
        while (n%i == 0)
        {
        n /= i;
        res.back().second++;
        }
        
    }
    if(n != 1) res.emplace_back(n,1);
    return res;
}

int main(){
    char s;
    if(s == 'A')cout << "T" << endl;
    else if(s=='T')cout << 'A' << endl;
    else if(s== 'C')cout << 'G' << endl:
    else cout << 'C' << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:40: error: expected ';' before ':' token
   32 |     else if(s== 'C')cout << 'G' << endl:
      |                                        ^
      |                                        ;
Language: C++

#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
const int INF = 1e9;

int main() {
char c;
  cin >> c;
  char ans;
  if(c=='A') ans ='T' 
  if(c=='T') ans ='A' 
  if(c=='G') ans ='C' 
  if(c=='C') ans ='G' 
  
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: expected ';' before 'if'
   12 |   if(c=='A') ans ='T'
      |                      ^
      |                      ;
   13 |   if(c=='T') ans ='A'
      |   ~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
#include <map>
using namespace std;
int main()
{
unordered_map<char,char> m;
m['A']='T';
m['T']='A';
m['C']='G';
m['G']='C';
char a;
cin >> a;
cout << m[a]<< endl; 
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: 'unordered_map' was not declared in this scope
   10 | unordered_map<char,char> m;
      | ^~~~~~~~~~~~~
a.cc:7:1: note: 'std::unordered_map' is defined in header '<unordered_map>'; this is probably fixable by adding '#include <unordered_map>'
    6 | #include <map>
  +++ |+#include <unordered_map>
    7 | using namespace std;
a.cc:10:15: error: expected primary-expression before 'char'
   10 | unordered_map<char,char> m;
      |               ^~~~
a.cc:11:1: error: 'm' was not declared in this scope; did you mean 'tm'?
   11 | m['A']='T';
      | ^
      | tm
a.cc: At global scope:
a.cc:19:1: error: expected unqualified-id before 'return'
   19 | return 0;
      | ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
#include <map>
using namespace std;
int main()
{
map<char,char> m;
m['A']='T';
m['T']='A';
m['C']='G';
m['G']='C';
char a;
cin >> a;
cout << m[a]<< endl; 
}
return 0;
}

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

#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
#include <map>
using namespace std;
int main()
{
    char a;
    cin >> a;
if(a=='A)'{
    cout << 'T' << endl;
}
else if(a=='T'){
    cout << 'A' << endl;
}
else if(a=='C'){
    cout << 'G' << endl;
}
else if(a=='G'){
    cout << 'C' << endl;

}
return 0;
}

Compiler output:
a.cc:12:7: warning: multi-character character constant [-Wmultichar]
   12 | if(a=='A)'{
      |       ^~~~
a.cc: In function 'int main()':
a.cc:12:11: error: expected ';' before '{' token
   12 | if(a=='A)'{
      |           ^
      |           ;
a.cc:15:1: error: expected primary-expression before 'else'
   15 | else if(a=='T'){
      | ^~~~
a.cc:14:2: error: expected ')' before 'else'
   14 | }
      |  ^
      |  )
   15 | else if(a=='T'){
      | ~~~~
a.cc:12:3: note: to match this '('
   12 | if(a=='A)'{
      |   ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
#include <map>
using namespace std;
int main()
{
    char a;
    cin >> a;
if(a==A){
    cout << 'T' << endl;
}
if(a=='T'){
    cout << 'A' << endl;
}
if(a=='C'){
    cout << 'G' << endl;
}
if(a=='G'){
    cout << 'C' << endl;

}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: 'A' was not declared in this scope
   12 | if(a==A){
      |       ^
Language: C++

#include <iostream>
#include <set>
#include <vector>
#include <utility>

using namespace std;

int main()
{
	int N, Q;
	cin >> N >> Q;
    
	string S;
	cin >> S;
    
    set<int> substrIdx;
    int min = -1;
    int max = 10001;
    for( int ii = 0; S[ii+1] != '\0'; ++ii){
        if( S[ii] == 'A' && S[ii+1] == 'C' ){
            substrIdx.insert(ii);
            if(min == -1){
                min = ii;
            }
            max = ii;
        }
    }
    //cout << min << "," << max << "," << substrIdx.size() << endl;
    
    vector<pair<int, int> > pairs;
    for( int ii = 0; ii < Q; ++ii ) {
        int li, ri;
        cin >> li >> ri;
        //cout << li-1 << "," << ri-2 << endl;
        pairs.insert(make_pair<int,int>(li, ri));
    }
        
    vector<int> outvec;
    for( auto pair : pairs ){
        int cnt = 0;
        if(!(pair.second-2 <= min || max <= pair.first-1) && pair.first-1 < pair.second-2){
            //cout << "in" << endl;
            for(int jj = pair.first-1; jj < pair.second-1; ++jj){
                if(substrIdx.find(jj) != substrIdx.end() && jj < pair.second-1){
                    ++cnt;
                }
            }
        }
        
        outvec.push_back(cnt);
    }
        
    for(auto out : outvec){
        cout << out << endl;
    }
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:41: error: cannot bind rvalue reference of type 'int&&' to lvalue of type 'int'
   35 |         pairs.insert(make_pair<int,int>(li, ri));
      |                                         ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 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/stl_pair.h:1132:21: note:   initializing argument 1 of 'constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = int; _T2 = int; typename __strip_reference_wrapper<typename decay<_Tp>::type>::__type = int; typename decay<_Tp>::type = int; typename __strip_reference_wrapper<typename decay<_Tp2>::type>::__type = int; typename decay<_Tp2>::type = int]'
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |               ~~~~~~^~~
Language: C++

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

int main() {
  str 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:5:3: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |   str b;
      |   ^~~
      |   std
a.cc:6:8: error: 'b' was not declared in this scope
    6 |   cin>>b;
      |        ^
Language: C++

b = input()
c = {'A':'T', 'T':'A', 'C':'G', 'G':'C'}
print(c[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(c[b])
      |      ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;

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 {
    cout << "G" << endl;
  }
  return 0;
}

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

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;

int main() {
	
	char b;
	cin >> b;
	if(b == 'A') puts('T');
	if(b == 'C') puts('G');
	if(b == 'G') puts('C');
	if(b == 'T') puts('A');
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   10 |         if(b == 'A') puts('T');
      |                           ^~~
      |                           |
      |                           char
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
a.cc:11:27: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   11 |         if(b == 'C') puts('G');
      |                           ^~~
      |                           |
      |                           char
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
a.cc:12:27: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   12 |         if(b == 'G') puts('C');
      |                           ^~~
      |                           |
      |                           char
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
a.cc:13:27: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   13 |         if(b == 'T') puts('A');
      |                           ^~~
      |                           |
      |                           char
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

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

int main() {
    string t;
    cin >> t;
    if(t == 'A') {
        cout << "T";
    } else if(t == 'C') {
        cout << "G";
    } else if(t == 'T') {
        cout << "A";
    } else if(t == 'G') {
        cout << "C";
    }
    return 0;
}


Compiler output:
a.cc:1:5: error: stray '#' in program
    1 | ++++#include <bits/stdc++.h>
      |     ^
a.cc:1:1: error: expected unqualified-id before '++' token
    1 | ++++#include <bits/stdc++.h>
      | ^~
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string t;
      |     ^~~~~~
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> t;
      |     ^~~
a.cc:6:12: error: 't' was not declared in this scope
    6 |     cin >> t;
      |            ^
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << "T";
      |         ^~~~
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout << "G";
      |         ^~~~
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout << "A";
      |         ^~~~
a.cc:14:9: error: 'cout' was not declared in this scope
   14 |         cout << "C";
      |         ^~~~
Language: C++

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

int main() {
  string s;
  cin >> s;

  if (s = 'A'){
    cout << 'T' << endl;
  }
  else if ( s = 'T'){
    cout << 'A' << endl;
  
  }
  else if (s = 'G'){
    cout << 'C' << endl;
}
 else{
   cout << 'G' << endl;
 }
}
  




Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(65)' from 'std::__cxx11::basic_string<char>' to 'bool'
    8 |   if (s = 'A'){
      |       ~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:11:15: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(84)' from 'std::__cxx11::basic_string<char>' to 'bool'
   11 |   else if ( s = 'T'){
      |             ~~^~~~~
      |               |
      |               std::__cxx11::basic_string<char>
a.cc:15:14: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(71)' from 'std::__cxx11::basic_string<char>' to 'bool'
   15 |   else if (s = 'G'){
      |            ~~^~~~~
      |              |
      |              std::__cxx11::basic_string<char>
Language: C++

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

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

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

int main() {
    char 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:7:27: error: 'T' was not declared in this scope
    7 |     if (b == 'A') cout << T << endl;
      |                           ^
a.cc:8:27: error: 'A' was not declared in this scope
    8 |     if (b == 'T') cout << A << endl;
      |                           ^
a.cc:9:27: error: 'C' was not declared in this scope
    9 |     if (b == 'G') cout << C << endl;
      |                           ^
a.cc:10:27: error: 'G' was not declared in this scope
   10 |     if (b == 'C') cout << G << endl;
      |                           ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: could not convert 'a.std::__cxx11::basic_string<char>::operator=(((const char*)"A"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    8 |   if(a="A"){
      |      ~^~~~
      |       |
      |       std::__cxx11::basic_string<char>
a.cc:10:13: error: could not convert 'a.std::__cxx11::basic_string<char>::operator=(((const char*)"T"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   10 |   }else if(a="T"){
      |            ~^~~~
      |             |
      |             std::__cxx11::basic_string<char>
a.cc:12:13: error: could not convert 'a.std::__cxx11::basic_string<char>::operator=(((const char*)"G"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 |   }else if(a="G"){
      |            ~^~~~
      |             |
      |             std::__cxx11::basic_string<char>
a.cc:14:13: error: could not convert 'a.std::__cxx11::basic_string<char>::operator=(((const char*)"C"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |   }else if(a="C"){
      |            ~^~~~
      |             |
      |             std::__cxx11::basic_string<char>
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <set>
#include <map>

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define for_p(i, a, b) for(int i = a; i < b; i++)
#define for_m(i, a, b) for(int i = a - 1; i >= b; i--)

//a = s1.size();
//vector<string> s1;
//string s2 = accumulate( s1.begin(), s1.end(), string() );

using namespace std;

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


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

#include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <cstring>
#include <map>

#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int MOD = 1000000007;

int main() {
  string s; cin >> s;

  string result;
  if (b=="A") result = "T";
  else if (b=="C") result = "G";
  else if (b=="G") result = "C";
  else result = "A";
  cout << result << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:7: error: 'b' was not declared in this scope
   20 |   if (b=="A") result = "T";
      |       ^
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
   Scanner scan=new Scanner(System.in);
    String b=scan.next();
    char[]ss=b.toCharArray();
   switch(ss){
   case 'A':
    System.out.println('T');
    break;
   case 'T':
    System.out.println('A');
    break; 
   case 'G':
    System.out.println('C');
    break;
   case 'C':
    System.out.println('G');
    break; 
    }
}
}
  

Compiler output:
Main.java:9: error: incompatible types: char cannot be converted to char[]
   case 'A':
        ^
Main.java:12: error: incompatible types: char cannot be converted to char[]
   case 'T':
        ^
Main.java:15: error: incompatible types: char cannot be converted to char[]
   case 'G':
        ^
Main.java:18: error: incompatible types: char cannot be converted to char[]
   case 'C':
        ^
4 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
   Scanner scan=new Scanner(System.in);
    String b=scan.next();
    char[]s=b.toCharArray();
   switch(s){
   case 'A':
    System.out.println('T');
    break;
   case 'T':
    System.out.println('A');
    break; 
   case 'G':
    System.out.println('C');
    break;
   case 'C':
    System.out.println('G');
    break; 
    }
}
}
  

Compiler output:
Main.java:9: error: incompatible types: char cannot be converted to char[]
   case 'A':
        ^
Main.java:12: error: incompatible types: char cannot be converted to char[]
   case 'T':
        ^
Main.java:15: error: incompatible types: char cannot be converted to char[]
   case 'G':
        ^
Main.java:18: error: incompatible types: char cannot be converted to char[]
   case 'C':
        ^
4 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
   Scanner scan=new Scanner(System.in);
    String b=scan.next();
    char s=(char)b;
   switch(s){
   case 'A':
    System.out.println('T');
    break;
   case 'T':
    System.out.println('A');
    break; 
   case 'G':
    System.out.println('C');
    break;
   case 'C':
    System.out.println('G');
    break; 
    }
}
}
  

Compiler output:
Main.java:7: error: incompatible types: String cannot be converted to char
    char s=(char)b;
                 ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
   Scanner scan=new Scanner(System.in);
    String b=scan.next();
    char s=(char)b;
   switch(s){
   case 'A':
    System.out.println('T');
    break;
    }
    case 'T':
    System.out.println('A');
    break; 
    }
    case 'G':
    System.out.println('C');
    break;
    }
    case 'C':
    System.out.println('G');
    break; 
    }
}
}
  

Compiler output:
Main.java:13: error: orphaned case
    case 'T':
    ^
Main.java:17: error: illegal start of type
    case 'G':
    ^
Main.java:18: error: <identifier> expected
    System.out.println('C');
                      ^
Main.java:18: error: illegal start of type
    System.out.println('C');
                       ^
Main.java:19: error: illegal start of type
    break;
    ^
Main.java:21: error: class, interface, enum, or record expected
    case 'C':
    ^
Main.java:23: error: class, interface, enum, or record expected
    break; 
    ^
Main.java:24: error: class, interface, enum, or record expected
    }
    ^
8 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
   Scanner scan=new Scanner(System.in);
    String b=scan.next();
    char s=(char)b;
   switch(s){
   case 'A':
    System.out.println('T');
    break;
    }
   case 'T'{
    System.out.println('A');
    break; 
    }
   case 'G'{
    System.out.println('C');
    break;
    }
   case 'C'{
    System.out.println('G');
    break; 
    }
}
}
  

Compiler output:
Main.java:13: error: orphaned case
   case 'T'{
   ^
Main.java:13: error: : or -> expected
   case 'T'{
           ^
Main.java:17: error: : or -> expected
   case 'G'{
           ^
Main.java:21: error: : or -> expected
   case 'C'{
           ^
4 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
   Scanner scan=new Scanner(System.in);
    char b=scan.next();
  if(b.equals('A')){
    System.out.println('T');
    }
  if(b.equals('T')){
    System.out.println('A');
    }
  if(b.equals('G')){
    System.out.println('C');
    }
  if(b.equals('C')){
    System.out.println('G');
    }
}
}
  

Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to char
    char b=scan.next();
                    ^
Main.java:7: error: char cannot be dereferenced
  if(b.equals('A')){
      ^
Main.java:10: error: char cannot be dereferenced
  if(b.equals('T')){
      ^
Main.java:13: error: char cannot be dereferenced
  if(b.equals('G')){
      ^
Main.java:16: error: char cannot be dereferenced
  if(b.equals('C')){
      ^
5 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
   Scanner scan=new Scanner(System.in);
    char b=scan.nextChar();
  if(b.equals('A')){
    System.out.println('T');
    }
  if(b.equals('T')){
    System.out.println('A');
    }
  if(b.equals('G')){
    System.out.println('C');
    }
  if(b.equals('C')){
    System.out.println('G');
    }
}
}
  

Compiler output:
Main.java:6: error: cannot find symbol
    char b=scan.nextChar();
               ^
  symbol:   method nextChar()
  location: variable scan of type Scanner
Main.java:7: error: char cannot be dereferenced
  if(b.equals('A')){
      ^
Main.java:10: error: char cannot be dereferenced
  if(b.equals('T')){
      ^
Main.java:13: error: char cannot be dereferenced
  if(b.equals('G')){
      ^
Main.java:16: error: char cannot be dereferenced
  if(b.equals('C')){
      ^
5 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
   Scanner scan=new Scanner(System.in);
    char 'b'=scan.nextChar();
  if(b.equals('A')){
    System.out.println('T');
    }
  if(b.equals('T')){
    System.out.println('A');
    }
  if(b.equals('G')){
    System.out.println('C');
    }
  if(b.equals('C')){
    System.out.println('G');
    }
}
}
  

Compiler output:
Main.java:6: error: not a statement
    char 'b'=scan.nextChar();
    ^
Main.java:6: error: ';' expected
    char 'b'=scan.nextChar();
        ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
   Scanner scan=new Scanner(System.in);
    char b=scan.nextchar();
  if(b.equals('A')){
    System.out.println('T');
    }
  if(b.equals('T')){
    System.out.println('A');
    }
  if(b.equals('G')){
    System.out.println('C');
    }
  if(b.equals('C')){
    System.out.println('G');
    }
}
}
  

Compiler output:
Main.java:6: error: cannot find symbol
    char b=scan.nextchar();
               ^
  symbol:   method nextchar()
  location: variable scan of type Scanner
Main.java:7: error: char cannot be dereferenced
  if(b.equals('A')){
      ^
Main.java:10: error: char cannot be dereferenced
  if(b.equals('T')){
      ^
Main.java:13: error: char cannot be dereferenced
  if(b.equals('G')){
      ^
Main.java:16: error: char cannot be dereferenced
  if(b.equals('C')){
      ^
5 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
   Scanner scan=new Scanner(System.in);
    Char b=scan.next();
  if(b.equals('A')){
    System.out.println('T');
    }
  if(b.equals('T')){
    System.out.println('A');
    }
  if(b.equals('G')){
    System.out.println('C');
    }
  if(b.equals('C')){
    System.out.println('G');
    }
}
}
  

Compiler output:
Main.java:6: error: cannot find symbol
    Char b=scan.next();
    ^
  symbol:   class Char
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args);
   Scanner scan=new Scanner(System.in);
    Char b=scan.next();
  if(b.equals('A')){
    System.out.println('T');
    }
  if(b.equals('T')){
    System.out.println('A');
    }
  if(b.equals('G')){
    System.out.println('C');
    }
  if(b.equals('C')){
    System.out.println('G');
    }
}
}
  

Compiler output:
Main.java:7: error: illegal start of type
  if(b.equals('A')){
  ^
Main.java:7: error: <identifier> expected
  if(b.equals('A')){
             ^
Main.java:7: error: illegal start of type
  if(b.equals('A')){
              ^
Main.java:10: error: illegal start of type
  if(b.equals('T')){
  ^
Main.java:10: error: <identifier> expected
  if(b.equals('T')){
             ^
Main.java:10: error: illegal start of type
  if(b.equals('T')){
              ^
Main.java:13: error: illegal start of type
  if(b.equals('G')){
  ^
Main.java:13: error: <identifier> expected
  if(b.equals('G')){
             ^
Main.java:13: error: illegal start of type
  if(b.equals('G')){
              ^
Main.java:16: error: illegal start of type
  if(b.equals('C')){
  ^
Main.java:16: error: <identifier> expected
  if(b.equals('C')){
             ^
Main.java:16: error: illegal start of type
  if(b.equals('C')){
              ^
Main.java:20: error: class, interface, enum, or record expected
}
^
13 errors
Language: C

#include <stdio.h>

int main(int argc, char const* argv[])
{
  int i = getchar();
  char r;
  if ((i > 0) && (i < 0x100)) {
    char c = (char)i;
    switch c {
      case 'A':
        r = 'T'; break;
      case 'T':
        r = 'A'; break;
      case 'G':
        r = 'C'; break;
      case 'C':
        r = 'G'; break;
      default:
        r = 0;
    }
    putchar((int)r);
  }
  return 0;
}




Compiler output:
main.c: In function 'main':
main.c:9:12: error: expected '(' before 'c'
    9 |     switch c {
      |            ^
      |            (
Language: C

#include <stdio.h>

int main(void) {

	char [80]b;

	scanf("%s", b);    
    
    if(b[0] == 'A'){
      puts('T');
    }
    else if(b == 'T'){
      puts('A');
    }
    else if(b == 'C'){
      puts('G');
    }
    else{
      puts('C');
    }

	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:14: error: expected identifier or '(' before '[' token
    5 |         char [80]b;
      |              ^
main.c:7:21: error: 'b' undeclared (first use in this function)
    7 |         scanf("%s", b);
      |                     ^
main.c:7:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:12: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion]
   10 |       puts('T');
      |            ^~~
      |            |
      |            int
In file included from main.c:1:
/usr/include/stdio.h:714:30: note: expected 'const char *' but argument is of type 'int'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
main.c:13:12: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion]
   13 |       puts('A');
      |            ^~~
      |            |
      |            int
/usr/include/stdio.h:714:30: note: expected 'const char *' but argument is of type 'int'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
main.c:16:12: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion]
   16 |       puts('G');
      |            ^~~
      |            |
      |            int
/usr/include/stdio.h:714:30: note: expected 'const char *' but argument is of type 'int'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
main.c:19:12: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion]
   19 |       puts('C');
      |            ^~~
      |            |
      |            int
/usr/include/stdio.h:714:30: note: expected 'const char *' but argument is of type 'int'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C

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


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

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

Compiler output:
main.c: In function 'main':
main.c:5:9: error: 'A' undeclared (first use in this function)
    5 |   if(b==A){
      |         ^
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:17: error: 'T' undeclared (first use in this function)
    6 |     printf("%c",T);
      |                 ^
main.c:11:9: error: 'G' undeclared (first use in this function)
   11 |   if(b==G){
      |         ^
main.c:12:17: error: 'C' undeclared (first use in this function)
   12 |     printf("%c",C);
      |                 ^
main.c:14:9: error: 'c' undeclared (first use in this function)
   14 |   if(b==c){
      |         ^
Language: C

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

Compiler output:
main.c:1:2: error: invalid preprocessing directive #indlude; did you mean #include?
    1 | #indlude<stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%c",&b);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #indlude<stdio.h>
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%c",&b);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:9: error: 'A' undeclared (first use in this function)
    5 |   if(b==A){
      |         ^
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |     printf("%c",T);
      |     ^~~~~~
main.c:6:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:17: error: 'T' undeclared (first use in this function)
    6 |     printf("%c",T);
      |                 ^
main.c:9:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    9 |     printf("%c",A);
      |     ^~~~~~
main.c:9:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:9: error: 'G' undeclared (first use in this function)
   11 |   if(b==G){
      |         ^
main.c:12:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   12 |     printf("%c",C);
      |     ^~~~~~
main.c:12:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:17: error: 'C' undeclared (first use in this function)
   12 |     printf("%c",C);
      |                 ^
main.c:14:9: error: 'c' undeclared (first use in this function)
   14 |   if(b==c){
      |         ^
main.c:15:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   15 |     printf("%c",G);
      |     ^~~~~~
main.c:15:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

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

int main(){
    string b;
    cin >> b;

    if (b[0]=='A'){
        cout << "T" << endl;
    }

    else if (b[0]=='T'){
        cout << "A" << nedl;
    }

    else if (b[0]=='C'){
        cout << "G" << nedl;
    }

    else if (b[0]=='G'){
        cout << "C" << nedl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: 'nedl' was not declared in this scope
   14 |         cout << "A" << nedl;
      |                        ^~~~
a.cc:18:24: error: 'nedl' was not declared in this scope
   18 |         cout << "G" << nedl;
      |                        ^~~~
a.cc:22:24: error: 'nedl' was not declared in this scope
   22 |         cout << "C" << nedl;
      |                        ^~~~
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String c = sc.next();
    String ans = "A";
    if (c.equals("A")){ans = "T";}
    if (c.equals("T")){ans = "A";}
    if (c.equals("C")){ans = "G";}
    if (c.equals("G")){ans = "C";}
    System.out.println(Ans);
  }
}


Compiler output:
Main.java:11: error: cannot find symbol
    System.out.println(Ans);
                       ^
  symbol:   variable Ans
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String c = sc.next();
    String Ans = "A";
    if (c.equals("A")){ans = "T";}
    if (c.equals("T")){ans = "A";}
    if (c.equals("C")){ans = "G";}
    if (c.equals("G")){ans = "C";}
    System.out.println(Ans);
  }
}

Compiler output:
Main.java:7: error: cannot find symbol
    if (c.equals("A")){ans = "T";}
                       ^
  symbol:   variable ans
  location: class Main
Main.java:8: error: cannot find symbol
    if (c.equals("T")){ans = "A";}
                       ^
  symbol:   variable ans
  location: class Main
Main.java:9: error: cannot find symbol
    if (c.equals("C")){ans = "G";}
                       ^
  symbol:   variable ans
  location: class Main
Main.java:10: error: cannot find symbol
    if (c.equals("G")){ans = "C";}
                       ^
  symbol:   variable ans
  location: class Main
4 errors
Language: C++

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

int main() {
  string s;
  string ans;  
  cin >> s;
    

  if (s == 　"A") ans = "T";
  if (s == "C") ans = "G";
  if (s == "G") ans = "C";
  if (s == "T") ans = "A";
  cout << ans << endl;
}


Compiler output:
a.cc:11:12: error: extended character 　 is not valid in an identifier
   11 |   if (s == 　"A") ans = "T";
      |            ^
a.cc: In function 'int main()':
a.cc:11:12: error: '\U00003000' was not declared in this scope
   11 |   if (s == 　"A") ans = "T";
      |            ^~
a.cc:11:14: error: expected ')' before string constant
   11 |   if (s == 　"A") ans = "T";
      |      ~       ^~~
      |              )
Language: C

int main(void){
  char s[1];
  scanf("%s",s);
  
  switch(s){
    case "A":
      printf("T\n");
      break;
    case "T":
      printf("A\n");
      break;
    case "C":
      printf("G\n");
      break;
    case "G":
      printf("C\n");
      break;
  }
  
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |   scanf("%s",s);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:3:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |   scanf("%s",s);
      |   ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:10: error: switch quantity not an integer
    5 |   switch(s){
      |          ^
main.c:6:5: error: pointers are not permitted as case values
    6 |     case "A":
      |     ^~~~
main.c:7:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |       printf("T\n");
      |       ^~~~~~
main.c:7:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:5: error: pointers are not permitted as case values
    9 |     case "T":
      |     ^~~~
main.c:12:5: error: pointers are not permitted as case values
   12 |     case "C":
      |     ^~~~
main.c:15:5: error: pointers are not permitted as case values
   15 |     case "G":
      |     ^~~~
Language: C++

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

int main(){
    string S;
    cin >> S;
    int count = 0;
    

    for(int i = 0; i < S.size()-1; i++){
        if(S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'G' || S.at(i) =='T'){
            if(S.at(i+1) == 'A' || S.at(i+1) == 'C' || S.at(i+1) == 'G' || S.at(i+1) =='T'){
                if(count == 0){
                    count++;
                }
                count++;
            }
            if(S.at(i+1) != 'A' || S.at(i+1) != 'C' || S.at(i+1) != 'G' || S.at(i+1) !='T'){
                count -= 1
            }

        }
    }

    cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:27: error: expected ';' before '}' token
   19 |                 count -= 1
      |                           ^
      |                           ;
   20 |             }
      |             ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    cin>>s;
    int ans=0;
    int cnt=0;
    for(int i=0;i<s.size();i++){
        if(s[i]=='A' ||s[i]=='T' ||s[i]=='G' ||s[i]=='C')
            ans++;
            cnt = max(cnt,ans);
        else
            ans = 0;
    }
    
    cout<< cnt <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'else' without a previous 'if'
   12 |         else
      |         ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:4: error: expected initializer before 'cin'
    6 |    cin>>b;
      |    ^~~
a.cc:7:6: error: 'b' was not declared in this scope
    7 |   if(b=='A'){
      |      ^