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

#include<iostream>
using namespace std;
int main(void){
std::string str1 = "A";
std::string str2 = "C";
std::string str3 = "G";
std::string str4 = "T";
if(cin >> str1;){
  cout << str4 << endl;}
  else(cin >> str3;){
    cout << str2 << endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected primary-expression before ')' token
    8 | if(cin >> str1;){
      |                ^
a.cc:10:19: error: expected ')' before ';' token
   10 |   else(cin >> str3;){
      |       ~           ^
      |                   )
a.cc:10:20: error: expected primary-expression before ')' token
   10 |   else(cin >> str3;){
      |                    ^
Language: C++

#include <iostream>

int main(void)
{
  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:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> b;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |       cout << 'T';
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:24: error: too many initializers for 'int [3]'
    5 |   int array[3]={A,T,C,G};
      |                        ^
Language: C++

#include<stdio.h>
int main(void){
  int b;
  int array[3]={A,T,C,G};
  if(b='A'){
    printf("%d",array[1]);
  }
  if(b='T'){
    printf("%d",array[0]);
  }
  if(b='C'){
    printf("%d",array[3]);
  }
  if(b='G'){
    printf("%d",array[2]);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'A' was not declared in this scope
    4 |   int array[3]={A,T,C,G};
      |                 ^
a.cc:4:19: error: 'T' was not declared in this scope
    4 |   int array[3]={A,T,C,G};
      |                   ^
a.cc:4:21: error: 'C' was not declared in this scope
    4 |   int array[3]={A,T,C,G};
      |                     ^
a.cc:4:23: error: 'G' was not declared in this scope
    4 |   int array[3]={A,T,C,G};
      |                       ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'A' was not declared in this scope
    5 |   if(b=A){
      |        ^
a.cc:8:8: error: 'T' was not declared in this scope
    8 |   if(b=T){
      |        ^
a.cc:11:8: error: 'C' was not declared in this scope
   11 |   if(b=C){
      |        ^
a.cc:14:8: error: 'G' was not declared in this scope
   14 |   if(b=G){
      |        ^
Language: C++


#include <iostream>
#include <vector>

using namespace std;

int main(){
    char S;
    char Ans;
    cin >> S;
    for(int i = 0;S[i] == '\0';i++){
        if(S[i] == 'A'){
            Ans[i] = 'T';
        }else if(S[i] == 'T'){
            Ans[i] = 'A';
        }else if(S[i] == 'C'){
            Ans[i] = 'G';
        }else{
            Ans[i] = 'C';
        }
    }
    cout << Ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: invalid types 'char[int]' for array subscript
   11 |     for(int i = 0;S[i] == '\0';i++){
      |                    ^
a.cc:12:13: error: invalid types 'char[int]' for array subscript
   12 |         if(S[i] == 'A'){
      |             ^
a.cc:13:16: error: invalid types 'char[int]' for array subscript
   13 |             Ans[i] = 'T';
      |                ^
a.cc:14:19: error: invalid types 'char[int]' for array subscript
   14 |         }else if(S[i] == 'T'){
      |                   ^
a.cc:15:16: error: invalid types 'char[int]' for array subscript
   15 |             Ans[i] = 'A';
      |                ^
a.cc:16:19: error: invalid types 'char[int]' for array subscript
   16 |         }else if(S[i] == 'C'){
      |                   ^
a.cc:17:16: error: invalid types 'char[int]' for array subscript
   17 |             Ans[i] = 'G';
      |                ^
a.cc:19:16: error: invalid types 'char[int]' for array subscript
   19 |             Ans[i] = 'C';
      |                ^
Language: C++

include <bits/stdc++.h>

#define ll          long long
#define mp	    make_pair
#define pb          push_back
#define pii         pair<int,int>
#define vi          vector<int>
#define vii         vector<pii>
#define mi          map<int,int>
#define mii         map<pii,int>
#define all(a)      (a).begin(),(a).end()
#define x           first
#define y           second
#define sz(x)       (int)x.size()
#define endl        '\n'
#define hell        1000000007
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define gcd(a,b)    __gcd((a),(b))
#define lcm(a,b)    ((a)*(b)) / gcd((a),(b))
#define rep(i,a,b)  for(int i=a;i<b;i++)
using namespace std;


void solve(){
    char t;
    cin>>t;
    if(t == 'A') cout << 'T' << endl;
    else if(t=='G')cout<<'C' << endl;
    else if(t=='T')cout<<'A' << endl;
    else cout<<'G' << endl;
}
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t;
     t =1;
//     cin>>t;
    while(t--){
        solve();
    }
    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'void solve()':
a.cc:28:5: error: 'cin' was not declared in this scope
   28 |     cin>>t;
      |     ^~~
a.cc:29:18: error: 'cout' was not declared in this scope
   29 |     if(t == 'A') cout << 'T' << endl;
      |                  ^~~~
a.cc:30:20: error: 'cout' was not declared in this scope
   30 |     else if(t=='G')cout<<'C' << endl;
      |                    ^~~~
a.cc:31:20: error: 'cout' was not declared in this scope
   31 |     else if(t=='T')cout<<'A' << endl;
      |                    ^~~~
a.cc:32:10: error: 'cout' was not declared in this scope
   32 |     else cout<<'G' << endl;
      |          ^~~~
a.cc: In function 'int main()':
a.cc:35:5: error: 'ios' has not been declared
   35 |     ios::sync_with_stdio(false);
      |     ^~~
a.cc:36:5: error: 'cin' was not declared in this scope
   36 |     cin.tie(0);
      |     ^~~
a.cc:37:5: error: 'cout' was not declared in this scope
   37 |     cout.tie(0);
      |     ^~~~
Language: C

#include <stdio.h>

int main(){
  char input_data, output_data[128];
  output_data["A"] = "T";
  output_data["G"] = "C";
  output_data["C"] = "G";
  output_data["T"] = "A";

  scanf("%s", &input_data);
  /* scanf("%s", &input); */
  /* switch(input){ */
  /* case "A" : */
  /*   output = "T"; */
  /*   break; */
  /* case "G" : */
  /*   output = "C"; */
  /*   break; */
  /* case "C" : */
  /*   output = "G"; */
  /*   break; */
  /* case "T" : */
  /*   output = "A"; */
  /*   break; */
  /* default: */
  /*   break; */
  /* } */
  printf("%s\n", output_data[input_data]);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:14: error: array subscript is not an integer
    5 |   output_data["A"] = "T";
      |              ^
main.c:6:14: error: array subscript is not an integer
    6 |   output_data["G"] = "C";
      |              ^
main.c:7:14: error: array subscript is not an integer
    7 |   output_data["C"] = "G";
      |              ^
main.c:8:14: error: array subscript is not an integer
    8 |   output_data["T"] = "A";
      |              ^
Language: C

#include <stdio.h>

int main(){
  char input, output;
  scanf("%s", &input);
  switch(input){
  case "A" :
    output = "T";
    break;
  case "G" :
    output = "C";
    break;
  case "C" :
    output = "G";
    break;
  case "T" :
    output = "A";
    break;
  default:
    break;
  }
  printf("%s\n", output);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:3: error: pointers are not permitted as case values
    7 |   case "A" :
      |   ^~~~
main.c:8:12: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
    8 |     output = "T";
      |            ^
main.c:10:3: error: pointers are not permitted as case values
   10 |   case "G" :
      |   ^~~~
main.c:11:12: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   11 |     output = "C";
      |            ^
main.c:13:3: error: pointers are not permitted as case values
   13 |   case "C" :
      |   ^~~~
main.c:14:12: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   14 |     output = "G";
      |            ^
main.c:16:3: error: pointers are not permitted as case values
   16 |   case "T" :
      |   ^~~~
main.c:17:12: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   17 |     output = "A";
      |            ^
Language: C++

#include <stdio.h>

int main(void)
{

   char b;

   scanf("%s",&b);

   if (b=='A'){
         printf("T");
      }
   else if (b=='T'){
         printf("A");
         }
   else if (b=='C'){
         printf("G");
         }
   else if (b=='G'){
         printf("C");
         }

   return 0;
                          

Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: error: expected '}' at end of input
   23 |    return 0;
      |             ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C

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

Compiler output:
main.c:15:1: error: expected identifier or '(' before '~' token
   15 | ~
      | ^
Language: C++

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

Compiler output:
a.cc:15:2: error: expected class-name at end of input
   15 | ~
      |  ^
Language: C

#include <stdio.h>
int main(void){
  // 文字を入れるdという入れ物 (シャリ)
  char d;
  // 標準入力(string = 文字列)をdに放り込む (ネタを乗っけたシャリ)
  scanf("%c",&d);
  //条件分岐
  //==は等しい、= は代入　x = 4 : xという入れ物に4を入れる
  //d は　マグロですか？
  if(d == 'A'){
    printf("%c",'T');
  }
  else if(d == 'T'){
    printf("%c",'A');
  }else if(d == 'G'){
    printf("%c",'C');
  }else{
    printf("%c",'G')
  }
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:21: error: expected ';' before '}' token
   18 |     printf("%c",'G')
      |                     ^
      |                     ;
   19 |   }
      |   ~
Language: C

#include <stdio.h>
int main(void){
  // 文字を入れるdという入れ物 (シャリ)
  char d;
  // 標準入力(string = 文字列)をdに放り込む (ネタを乗っけたシャリ)
  scanf("%s",&d);
  //条件分岐
  //==は等しい、= は代入　x = 4 : xという入れ物に4を入れる
  //d は　マグロですか？
  if(d == 'A'){
    printf("%s",'T');
  }
  else if(d == 'T'){
    printf("%s",'A');
  }else if(d == 'G'){
    printf("%s",'C');
  }else{
    printf("%s",'G')
  }
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:21: error: expected ';' before '}' token
   18 |     printf("%s",'G')
      |                     ^
      |                     ;
   19 |   }
      |   ~
Language: C++

#include<iostream>
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:6:9: error: 'A' was not declared in this scope
    6 |   if(a==A)
      |         ^
a.cc:8:9: error: 'T' was not declared in this scope
    8 |   if(a==T)
      |         ^
a.cc:10:9: error: 'C' was not declared in this scope
   10 |   if(a==C)
      |         ^
a.cc:12:9: error: 'G' was not declared in this scope
   12 |   if(a==G)
      |         ^
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(x=="A"){
      |      ~^~~~~
a.cc:9:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   }if(x=="T"){
      |       ~^~~~~
a.cc:11:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   }if(x=="C"){
      |       ~^~~~~
a.cc:13:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   }if(x=="G"){
      |       ~^~~~~
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 {
    cout << "G" << endl;
	}
}  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   else if ( b == "G" ) {
      |             ~~^~~~~~
a.cc:14:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |   else if ( b == "T" ) {
      |             ~~^~~~~~
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 {
    cout << "G" << endl;
	}
}  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if ( b == "A" ) {
      |        ~~^~~~~~
a.cc:11:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   else if ( b == "G" ) {
      |             ~~^~~~~~
a.cc:14:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |   else if ( b == "T" ) {
      |             ~~^~~~~~
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 {
    cout << G << endl;
	}
}  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'A' was not declared in this scope
    8 |   if ( b == A ) {
      |             ^
a.cc:9:17: error: 'T' was not declared in this scope
    9 |         cout << T << endl;
      |                 ^
a.cc:11:18: error: 'G' was not declared in this scope
   11 |   else if ( b == G ) {
      |                  ^
a.cc:12:12: error: 'C' was not declared in this scope
   12 |    cout << C << endl;
      |            ^
a.cc:14:18: error: 'T' was not declared in this scope
   14 |   else if ( b == T ) {
      |                  ^
Language: C++

#include<iostream>
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{
  cout<<"G"<<endl;
  }
}

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin>>b;
      |         ^~~
Language: Java

import java.util.*

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

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
1 error
Language: Java

import java.util.*

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

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
Main.java:12: error: ';' expected
            a = "T"
                   ^
Main.java:15: error: ';' expected
            a = "A"
                   ^
Main.java:18: error: ';' expected
            a = "C"
                   ^
Main.java:21: error: ';' expected
            a = "G"
                   ^
5 errors
Language: C++

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

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

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

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

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

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

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


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

#include<iostream>

int main()
{
  char a;
  
  cin >> a;
  
  switch(a){
    case A :
      cout << T << endl;
      break;
          case T :
      cout << A << endl;
      break;
          case G :
      cout << C << endl;
      break;
          case C :
      cout << G << endl;
      break;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> a;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:10: error: 'A' was not declared in this scope
   10 |     case A :
      |          ^
a.cc:11:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |       cout << T << endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:15: error: 'T' was not declared in this scope
   11 |       cout << T << endl;
      |               ^
a.cc:11:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |       cout << T << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:16:16: error: 'G' was not declared in this scope
   16 |           case G :
      |                ^
a.cc:17:15: error: 'C' was not declared in this scope
   17 |       cout << C << endl;
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	char a;
	cin>>a;
	switch(a){
		case "A":cout<<"T"<<endl;break;
		case "T":cout<<"A"<<endl;break;
		case "C":cout<<"G"<<endl;break;
		case "G":cout<<"C"<<endl;break;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: conversion from 'const char*' to 'int' in a converted constant expression
    7 |                 case "A":cout<<"T"<<endl;break;
      |                      ^~~
a.cc:7:22: error: could not convert '"A"' from 'const char [2]' to 'int'
    7 |                 case "A":cout<<"T"<<endl;break;
      |                      ^~~
      |                      |
      |                      const char [2]
a.cc:8:22: error: conversion from 'const char*' to 'int' in a converted constant expression
    8 |                 case "T":cout<<"A"<<endl;break;
      |                      ^~~
a.cc:8:22: error: could not convert '"T"' from 'const char [2]' to 'int'
    8 |                 case "T":cout<<"A"<<endl;break;
      |                      ^~~
      |                      |
      |                      const char [2]
a.cc:9:22: error: conversion from 'const char*' to 'int' in a converted constant expression
    9 |                 case "C":cout<<"G"<<endl;break;
      |                      ^~~
a.cc:9:22: error: could not convert '"C"' from 'const char [2]' to 'int'
    9 |                 case "C":cout<<"G"<<endl;break;
      |                      ^~~
      |                      |
      |                      const char [2]
a.cc:10:22: error: conversion from 'const char*' to 'int' in a converted constant expression
   10 |                 case "G":cout<<"C"<<endl;break;
      |                      ^~~
a.cc:10:22: error: could not convert '"G"' from 'const char [2]' to 'int'
   10 |                 case "G":cout<<"C"<<endl;break;
      |                      ^~~
      |                      |
      |                      const char [2]
Language: C++

#include<bits/stdc++.h>

int main(){
	char ch;
  	cin>>ch;
  	if(ch=='G') printf("C\n");
  	if(ch=='C') printf("G\n");
  	if(ch=='T') printf("A\n");
  	if(ch=='A') printf("T\n");
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin>>ch;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

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

int main() {
  std::unordered_map<std::string, string> mp;
  mp["A"] = "T";
  mp["T"] = "A";
  mp["G"] = "C";
  mp["C"] = "G";
  string x;
  cin >> x;
  cout << mp[x] << endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclide; did you mean #include?
    1 | #inclide <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:27: error: 'string' is not a member of 'std'
    6 |   std::unordered_map<std::string, string> mp;
      |                           ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    2 | #include <unordered_map>
  +++ |+#include <string>
    3 | using namespace std;
a.cc:6:35: error: 'string' was not declared in this scope
    6 |   std::unordered_map<std::string, string> mp;
      |                                   ^~~~~~
a.cc:6:35: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
a.cc:6:41: error: template argument 1 is invalid
    6 |   std::unordered_map<std::string, string> mp;
      |                                         ^
a.cc:6:41: error: template argument 2 is invalid
a.cc:6:41: error: template argument 3 is invalid
a.cc:6:41: error: template argument 4 is invalid
a.cc:6:41: error: template argument 5 is invalid
a.cc:7:11: error: assignment of read-only location '"A"[mp]'
    7 |   mp["A"] = "T";
      |   ~~~~~~~~^~~~~
a.cc:8:11: error: assignment of read-only location '"T"[mp]'
    8 |   mp["T"] = "A";
      |   ~~~~~~~~^~~~~
a.cc:9:11: error: assignment of read-only location '"G"[mp]'
    9 |   mp["G"] = "C";
      |   ~~~~~~~~^~~~~
a.cc:10:11: error: assignment of read-only location '"C"[mp]'
   10 |   mp["C"] = "G";
      |   ~~~~~~~~^~~~~
a.cc:11:9: error: expected ';' before 'x'
   11 |   string x;
      |         ^~
      |         ;
a.cc:12:3: error: 'cin' was not declared in this scope
   12 |   cin >> x;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <unordered_map>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:12:10: error: 'x' was not declared in this scope
   12 |   cin >> x;
      |          ^
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout << mp[x] << endl;
      |   ^~~~
a.cc:13:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:20: error: 'endl' was not declared in this scope
   13 |   cout << mp[x] << endl;
      |                    ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <unordered_map>
  +++ |+#include <ostream>
    3 | using namespace std;
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++

1 b = input()
2 c = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
3 print(c[b])

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 1 b = input()
      | ^
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3 print(c[b])
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected '(' before 'a'
    6 |         if a == 'A';
      |            ^
      |            (
a.cc:7:22: error: expected ';' before 'if'
    7 |           cout << 'C'
      |                      ^
      |                      ;
    8 |         if a == 'C';
      |         ~~            
a.cc:9:22: error: expected ';' before 'if'
    9 |           cout << 'A'
      |                      ^
      |                      ;
   10 |         if a == 'T';
      |         ~~            
a.cc:11:22: error: expected ';' before 'if'
   11 |           cout << 'G'
      |                      ^
      |                      ;
   12 |         if a == 'G';
      |         ~~            
a.cc:13:22: error: expected ';' before 'return'
   13 |           cout << 'T'
      |                      ^
      |                      ;
   14 |         return 0;
      |         ~~~~~~
Language: C

#include <stdio.h>

int main(void){
  int i, j, print_j;
  int ATC_COUNT[10] = {0,0,0,0,0,0,0,0,0,0};
  char STRING[10];
  scanf("%s", STRING);
  for(i=0; i<=10; i++){
    if(STRING[i] == 'A' || STRING[i] == 'G' || STRING[i] == 'C' || STRING[i] == 'T') {
      ATC_COUNT[i] = 1;
    }
  }
  for(i=0; i<=10; i++){
    if(ATC_COUNT[i] == 1){
		j++;
    }
    print_j = j;
    if(ATC_COUNT[i] == 0){
      j = 0;
    }
    printf("%d", print_j);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

#include <stdio.h>

int main(void){
  int i, j, print_j;
  int ATC_COUNT[10] = {0,0,0,0,0,0,0,0,0,0};
  char STRING[10];
  scanf("%s", STRING);
  for(i=0; i<=10; i++){
    if(STRING[i] == 'A' || STRING[i] == 'G' || STRING[i] == 'C' || STRING[i] == 'T') {
      ATC_COUNT[i] = 1;
    }
  }
  for(i=0; i<=10; i++){
    if(ATC_COUNT[i] == 1){
		j++;
    }
    print_j = j;
    if(ATC_COUNT[i] == 0){
      j = 0;
    }
    printf("%d,print_j);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:21:12: warning: missing terminating " character
   21 |     printf("%d,print_j);
      |            ^
main.c:21:12: error: missing terminating " character
   21 |     printf("%d,print_j);
      |            ^~~~~~~~~~~~~
main.c:22:3: error: expected expression before 'return'
   22 |   return 0;
      |   ^~~~~~
main.c:22:12: error: expected ';' before '}' token
   22 |   return 0;
      |            ^
      |            ;
   23 | }
      | ~           
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

#include <stdio.h>

int main(void){
  int i, j, print_j;
  int ATC_COUNT[9] = {0,0,0,0,0,0,0,0,0,0};
  char STRING[10];
  scanf("%s", STRING);
  for(i=0; i<=10; i++){
    if(STRING[i] == 'A' || STRING[i] == 'G' || STRING[i] == 'C' || STRING[i] == 'T') {
      ATC_COUNT[i] = 1;
    }
  }
  for(i=0; i<=10; i++){
    if(ATC_COUNT[i] == 1){
		j++;
    }
    printj = j;
    if(ATC_COUNT[i] == 0){
      j = 0;
    }
    printf("%d,printj);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:41: warning: excess elements in array initializer
    5 |   int ATC_COUNT[9] = {0,0,0,0,0,0,0,0,0,0};
      |                                         ^
main.c:5:41: note: (near initialization for 'ATC_COUNT')
main.c:17:5: error: 'printj' undeclared (first use in this function); did you mean 'print_j'?
   17 |     printj = j;
      |     ^~~~~~
      |     print_j
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:12: warning: missing terminating " character
   21 |     printf("%d,printj);
      |            ^
main.c:21:12: error: missing terminating " character
   21 |     printf("%d,printj);
      |            ^~~~~~~~~~~~
main.c:22:3: error: expected expression before 'return'
   22 |   return 0;
      |   ^~~~~~
main.c:22:12: error: expected ';' before '}' token
   22 |   return 0;
      |            ^
      |            ;
   23 | }
      | ~           
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

#include <stdio.h>

int main(void){
  int i, j, print_j;
  int ATC_COUNT[9] {0,0,0,0,0,0,0,0,0,0};
  char STRING[10];
  scanf("%s", string);
  for(i=0; i<=10; i++){
    if(STRING[i] == 'A' || STRING[i] == 'G' || STRING[i] == 'C' || STRING[i] == 'T') {
      ATC_COUNT[i] = 1;
    }
  }
  for(i=0; i<=10; i++){
    if(ATC_COUNT[i] == 1){
		j++;
    }
    printj = j;
    if(ATC_COUNT[i] == 0){
      j = 0;
    }
    printf("%d,printj);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    5 |   int ATC_COUNT[9] {0,0,0,0,0,0,0,0,0,0};
      |                    ^
main.c:5:40: error: expected ';' before '}' token
    5 |   int ATC_COUNT[9] {0,0,0,0,0,0,0,0,0,0};
      |                                        ^
      |                                        ;
main.c:7:15: error: 'string' undeclared (first use in this function); did you mean 'stdin'?
    7 |   scanf("%s", string);
      |               ^~~~~~
      |               stdin
main.c:7:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:7: error: 'ATC_COUNT' undeclared (first use in this function)
   10 |       ATC_COUNT[i] = 1;
      |       ^~~~~~~~~
main.c:17:5: error: 'printj' undeclared (first use in this function); did you mean 'print_j'?
   17 |     printj = j;
      |     ^~~~~~
      |     print_j
main.c:21:12: warning: missing terminating " character
   21 |     printf("%d,printj);
      |            ^
main.c:21:12: error: missing terminating " character
   21 |     printf("%d,printj);
      |            ^~~~~~~~~~~~
main.c:22:3: error: expected expression before 'return'
   22 |   return 0;
      |   ^~~~~~
main.c:22:12: error: expected ';' before '}' token
   22 |   return 0;
      |            ^
      |            ;
   23 | }
      | ~           
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

#include <stdio.h>

int main(void){
  char salt[10];
  char A = 'A', C = 'C', G = 'G', T = 'T';
  salt = getchar();
  if(strcmp(salt,A) == 0){
    printf("T");
  } else if(strcmp(salt, C) == 0){
    printf("G");
  } else if(strcmp(salt, G)){
    printf("C");
  } else {
    printf("A");
  }
  return 0;
}
    

Compiler output:
main.c: In function 'main':
main.c:6:8: error: assignment to expression with array type
    6 |   salt = getchar();
      |        ^
main.c:7:6: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
    7 |   if(strcmp(salt,A) == 0){
      |      ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:7:18: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    7 |   if(strcmp(salt,A) == 0){
      |                  ^
      |                  |
      |                  char
main.c:7:18: note: expected 'const char *' but argument is of type 'char'
main.c:9:26: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    9 |   } else if(strcmp(salt, C) == 0){
      |                          ^
      |                          |
      |                          char
main.c:9:26: note: expected 'const char *' but argument is of type 'char'
main.c:11:26: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   11 |   } else if(strcmp(salt, G)){
      |                          ^
      |                          |
      |                          char
main.c:11:26: note: expected 'const char *' but argument is of type 'char'
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(b=="A"){
      |            ~^~~~~
a.cc:11:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   11 |                 d="T";
      |                   ^~~
      |                   |
      |                   const char*
a.cc:13:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |         if(b=="T"){
      |            ~^~~~~
a.cc:14:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   14 |                 d="A";
      |                   ^~~
      |                   |
      |                   const char*
a.cc:16:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |         if(b=="G"){
      |            ~^~~~~
a.cc:17:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   17 |                 d="C";
      |                   ^~~
      |                   |
      |                   const char*
a.cc:19:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |         if(b=="C"){
      |            ~^~~~~
a.cc:20:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   20 |                 d="G";
      |                   ^~~
      |                   |
      |                   const char*
Language: C++


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'A' was not declared in this scope
   11 |         if(b==A){
      |               ^
a.cc:12:19: error: 'T' was not declared in this scope
   12 |                 d=T;
      |                   ^
a.cc:14:15: error: 'T' was not declared in this scope
   14 |         if(b==T){
      |               ^
a.cc:15:19: error: 'A' was not declared in this scope
   15 |                 d=A;
      |                   ^
a.cc:17:15: error: 'G' was not declared in this scope
   17 |         if(b==G){
      |               ^
a.cc:18:19: error: 'C' was not declared in this scope
   18 |                 d=C;
      |                   ^
a.cc:20:15: error: 'C' was not declared in this scope
   20 |         if(b==C){
      |               ^
a.cc:21:19: error: 'G' was not declared in this scope
   21 |                 d=G
      |                   ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(b=="A"){
      |            ~^~~~~
a.cc:11:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   11 |                 d="T";
      |                   ^~~
      |                   |
      |                   const char*
a.cc:13:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |         if(b=="T"){
      |            ~^~~~~
a.cc:14:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   14 |                 d="A";
      |                   ^~~
      |                   |
      |                   const char*
a.cc:16:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |         if(b=="G"){
      |            ~^~~~~
a.cc:17:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   17 |                 d="C";
      |                   ^~~
      |                   |
      |                   const char*
a.cc:19:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |         if(b=="C"){
      |            ~^~~~~
a.cc:20:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   20 |                 d="G"
      |                   ^~~
      |                   |
      |                   const char*
a.cc:20:22: error: expected ';' before '}' token
   20 |                 d="G"
      |                      ^
      |                      ;
   21 |         }
      |         ~
Language: C++

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

int main(){
    char s;
    cin >> s;
    int n = (int)kan.size();

    int maxp = 0, ni = 0;
    for (int i = 0; i < n; i++) {
        if (kan[i] != 'A' && kan[i] != 'C' && kan[i] != 'G' && kan[i] != 'T'){
            ni = 0;
            continue;
        }
        maxp = max(maxp, ++ni)
    }


    cout << maxp << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: 'kan' was not declared in this scope; did you mean 'tan'?
    7 |     int n = (int)kan.size();
      |                  ^~~
      |                  tan
a.cc:15:31: error: expected ';' before '}' token
   15 |         maxp = max(maxp, ++ni)
      |                               ^
      |                               ;
   16 |     }
      |     ~
Language: C++

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

int mian(){
    char b, ans;
    cin >> b;

    if (b == 'A') {
        ans = 'T';
    }else if (b == 'T') {
        ans = 'A';
    }else if (b == 'C') {
        ans = 'G';
    }else if (b == 'G') {
        ans = 'C';}

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int mian()':
a.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
   18 | }
      | ^
/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>
using namespace std;

int mian(){
    char b, ans;
    cin >> b;

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

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int mian()':
a.cc:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
   14 | }
      | ^
/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>
using namespace std;

mian(){
    char b, ans;
    cin >> b;

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

    cout << ans << endl;
}

Compiler output:
a.cc:4:1: error: ISO C++ forbids declaration of 'mian' with no type [-fpermissive]
    4 | mian(){
      | ^~~~
a.cc: In function 'int mian()':
a.cc:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
   14 | }
      | ^
Language: C++

#include <iostream>
 
int main()
{
  char a;
  
  std::cin >> a;
  
  if (a == 'A') {
    std::cout << "T" << std::endl;
  }
  
  if (a == 'T') {
    std:cout << "A" << std::endl;
  }
  
  if (a == 'G') {
    std::cout << "C" <<std::endl;
  }
  
  if (a == 'C') {
    std::cout << "G" << std::endl;
    
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |     std:cout << "A" << std::endl;
      |         ^~~~
      |         std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if (a == "A") {
      |       ~~^~~~~~
a.cc:13:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if (a == "T") {
      |       ~~^~~~~~
a.cc:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |     std:cout << "A" << std::endl;
      |         ^~~~
      |         std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |   if (a == "G") {
      |       ~~^~~~~~
a.cc:21:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |   if (a == "C") {
      |       ~~^~~~~~
Language: C

#include <stdio.h>

int main(void) {
  char c;
  
  scanf("%c", &c);
  
  switch(c) {
    case A:
      printf("T\n");
      break;
    case G:
      printf("C\n");
      break;
    default:
      break;
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:10: error: 'A' undeclared (first use in this function)
    9 |     case A:
      |          ^
main.c:9:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:10: error: 'G' undeclared (first use in this function)
   12 |     case G:
      |          ^
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String imp = scan.next();
		switch (imp) {
		case "A":
			System.out.println("T");
			break;
		case "T":
			System.out.println("A");
			break;
		case "C":
			System.out.println("G");
			break;
		case "G":
			System.out.println("C");
		}
	}
 
}
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String imp = scan.next();
		switch (imp) {
		case "A":
			System.out.println("T");
			break;
		case "T":
			System.out.println("A");
			break;
		case "C":
			System.out.println("G");
			break;
		case "G":
			System.out.println("C");
		}
	}

}


Compiler output:
Main.java:22: error: class, interface, enum, or record expected
import java.util.Scanner;
^
1 error