Language: C++

using namespace std;
 
int main() {
  string x,A,T,G,C;
  cin >> x;
  if(x == A)
    cout << "T" <<endl;
  else if(x == T)
    cout << "A" <<endl;
  else if(x == G)
    cout << "C" <<endl;
  else if(x == C)
    cout << "G" <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string x,A,T,G,C;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> x;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:5:10: error: 'x' was not declared in this scope
    5 |   cin >> x;
      |          ^
a.cc:6:11: error: 'A' was not declared in this scope
    6 |   if(x == A)
      |           ^
a.cc:7:5: error: 'cout' was not declared in this scope
    7 |     cout << "T" <<endl;
      |     ^~~~
a.cc:7:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:19: error: 'endl' was not declared in this scope
    7 |     cout << "T" <<endl;
      |                   ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:8:16: error: 'T' was not declared in this scope
    8 |   else if(x == T)
      |                ^
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout << "A" <<endl;
      |     ^~~~
a.cc:9:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:19: error: 'endl' was not declared in this scope
    9 |     cout << "A" <<endl;
      |                   ^~~~
a.cc:9:19: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:10:16: error: 'G' was not declared in this scope
   10 |   else if(x == G)
      |                ^
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << "C" <<endl;
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:19: error: 'endl' was not declared in this scope
   11 |     cout << "C" <<endl;
      |                   ^~~~
a.cc:11:19: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:12:16: error: 'C' was not declared in this scope
   12 |   else if(x == C)
      |                ^
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << "G" <<endl;
      |     ^~~~
a.cc:13:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:19: error: 'endl' was not declared in this scope
   13 |     cout << "G" <<endl;
      |                   ^~~~
a.cc:13:19: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'