criyle/codenet-compile-errors huggingface dataset:
Language: Java


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String b = sc.next();
        
        if (b.equals(”A”)) {
            System.out.println("T");
        } else if (b.equals(”T”)) {
            System.out.println("A");
        } else  if (b.equals(”G”)) {
            System.out.println("C");
        } else {
            System.out.println("G");
    }
}


Compiler output:
Main.java:10: error: illegal character: '\u201d'
        if (b.equals(?A?)) {
                     ^
Main.java:10: error: illegal character: '\u201d'
        if (b.equals(?A?)) {
                       ^
Main.java:10: error: not a statement
        if (b.equals(?A?)) {
                      ^
Main.java:12: error: illegal character: '\u201d'
        } else if (b.equals(?T?)) {
                            ^
Main.java:12: error: 'else' without 'if'
        } else if (b.equals(?T?)) {
          ^
Main.java:12: error: illegal character: '\u201d'
        } else if (b.equals(?T?)) {
                              ^
Main.java:12: error: not a statement
        } else if (b.equals(?T?)) {
                             ^
Main.java:14: error: illegal character: '\u201d'
        } else  if (b.equals(?G?)) {
                             ^
Main.java:14: error: 'else' without 'if'
        } else  if (b.equals(?G?)) {
          ^
Main.java:14: error: illegal character: '\u201d'
        } else  if (b.equals(?G?)) {
                               ^
Main.java:14: error: not a statement
        } else  if (b.equals(?G?)) {
                              ^
Main.java:16: error: 'else' without 'if'
        } else {
          ^
Main.java:19: error: reached end of file while parsing
}
 ^
13 errors
Language: Java

import java.util.*;
import java.util.HashSet;
import java.util.ArrayList;
import java.util.List;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String b = sc.next();
        
        if (b.equals(”A”)) {
            System.out.println("T");
        } else if (b.equals(”T”)) {
            System.out.println("A");
        } else  if (b.equals(”G”)) {
            System.out.println("C");
        } else {
            System.out.println("G");
    }
}


Compiler output:
Main.java:16: error: illegal character: '\u201d'
        if (b.equals(?A?)) {
                     ^
Main.java:16: error: illegal character: '\u201d'
        if (b.equals(?A?)) {
                       ^
Main.java:16: error: not a statement
        if (b.equals(?A?)) {
                      ^
Main.java:18: error: illegal character: '\u201d'
        } else if (b.equals(?T?)) {
                            ^
Main.java:18: error: 'else' without 'if'
        } else if (b.equals(?T?)) {
          ^
Main.java:18: error: illegal character: '\u201d'
        } else if (b.equals(?T?)) {
                              ^
Main.java:18: error: not a statement
        } else if (b.equals(?T?)) {
                             ^
Main.java:20: error: illegal character: '\u201d'
        } else  if (b.equals(?G?)) {
                             ^
Main.java:20: error: 'else' without 'if'
        } else  if (b.equals(?G?)) {
          ^
Main.java:20: error: illegal character: '\u201d'
        } else  if (b.equals(?G?)) {
                               ^
Main.java:20: error: not a statement
        } else  if (b.equals(?G?)) {
                              ^
Main.java:22: error: 'else' without 'if'
        } else {
          ^
Main.java:25: error: reached end of file while parsing
}
 ^
13 errors
Language: C++

#inclidude <iostream>
using namespase std;
int main()
{
char 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;
}
return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclidude; did you mean #include?
    1 | #inclidude <iostream>
      |  ^~~~~~~~~
      |  include
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
    6 | cin>>b;
      | ^~~
a.cc:7:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 | if(b=="a")
      |    ~^~~~~
a.cc:9:1: error: 'cout' was not declared in this scope
    9 | cout<<"t"<<endl;
      | ^~~~
a.cc:9:12: error: 'endl' was not declared in this scope
    9 | cout<<"t"<<endl;
      |            ^~~~
a.cc:11:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 | if(b=="t")
      |    ~^~~~~
a.cc:13:1: error: 'cout' was not declared in this scope
   13 | cout<<"a"<<endl;
      | ^~~~
a.cc:13:12: error: 'endl' was not declared in this scope
   13 | cout<<"a"<<endl;
      |            ^~~~
a.cc:15:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 | if(b=="c")
      |    ~^~~~~
a.cc:17:1: error: 'cout' was not declared in this scope
   17 | cout<<"g"<<endl;
      | ^~~~
a.cc:17:12: error: 'endl' was not declared in this scope
   17 | cout<<"g"<<endl;
      |            ^~~~
a.cc:19:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 | if(b=="g")
      |    ~^~~~~
a.cc:21:1: error: 'cout' was not declared in this scope
   21 | cout<<"c"<<endl;
      | ^~~~
a.cc:21:12: error: 'endl' was not declared in this scope
   21 | cout<<"c"<<endl;
      |            ^~~~
Language: C++

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

int main(){
  string s;
  int cnt;
  int ret;
  
  cin >> s;
  for(int i = 0; i < (int)s.size(); i++){
    char ch = s[i];
    if(ch == 'A' || ch == 'G' || ch == 'C' || ch == 'T'){
      cnt++;
    }else{
      if(ret < cnt){
        ret = cnt;
        cnt = 0;
      }
    }
　}
  printf("%d", ret);
}


Compiler output:
a.cc:21:1: error: extended character 　 is not valid in an identifier
   21 | 　}
      | ^
a.cc: In function 'int main()':
a.cc:21:1: error: '\U00003000' was not declared in this scope
   21 | 　}
      | ^~
Language: C++

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

int main(){
  string s;
  int cnt;
  int ret;
  
  cin >> s;
  for(int i = 0; i < (int)s.size(); i++){
    char ch = s[i];
    if(ch == 'A' || ch == 'G' || ch == 'C' || ch == 'T'){
      cnt++;
    }else{
      if(ret < cnt){
        ret = cnt;
        cnt = 0;
      }
    }
　}
  print("%d", ret);
}


Compiler output:
a.cc:21:1: error: extended character 　 is not valid in an identifier
   21 | 　}
      | ^
a.cc: In function 'int main()':
a.cc:21:1: error: '\U00003000' was not declared in this scope
   21 | 　}
      | ^~
a.cc:22:3: error: 'print' was not declared in this scope; did you mean 'printf'?
   22 |   print("%d", ret);
      |   ^~~~~
      |   printf
Language: Java


#include <iostream>
#include <string>

using namespace std;

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

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


Compiler output:
Main.java:2: error: illegal character: '#'
#include <iostream>
^
Main.java:3: error: illegal character: '#'
#include <string>
^
Main.java:10: error: not a statement
	cin >> b;
	    ^
Main.java:13: error: not a statement
		cout << "T" << endl;
		            ^
Main.java:16: error: not a statement
		cout << "A" << endl;
		            ^
Main.java:19: error: not a statement
		cout << "G" << endl;
		            ^
Main.java:22: error: not a statement
		cout << "C" << endl;
		            ^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
8 errors
Language: C

#include <stdio.h>

int main(void)
{
  char b;
  
  scanf("%c", &b);
  
  if(b=='A'){
    printf("T");
  else if(b=='T'){
    printf("A");
  else if(b=='C'){
    printf("G");
  else if(b=='G'){
    printf("C");
  }
    
  return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:11:3: error: expected '}' before 'else'
   11 |   else if(b=='T'){
      |   ^~~~
main.c:13:3: error: expected '}' before 'else'
   13 |   else if(b=='C'){
      |   ^~~~
main.c:15:3: error: expected '}' before 'else'
   15 |   else if(b=='G'){
      |   ^~~~
Language: C++

#include <stdio.h>

int main(){
  string i;
  cin >> i;
  if(i == 'A' || i == 'T'){
    printf((i == 'A') ? 'T' : 'A');
  }else{
    printf((i == 'G') ? 'C' : 'G');
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope; did you mean 'stdin'?
    4 |   string i;
      |   ^~~~~~
      |   stdin
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> i;
      |   ^~~
a.cc:5:10: error: 'i' was not declared in this scope
    5 |   cin >> i;
      |          ^
Language: C++

#include <stdio.h>

int main(){
  char i;
  cin >> i;
  if(i == 'A' || i == 'T'){
    printf((i == 'A') ? 'T' : 'A');
  }else{
    printf((i == 'G') ? 'C' : 'G');
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> i;
      |   ^~~
a.cc:7:23: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    7 |     printf((i == 'A') ? 'T' : 'A');
      |            ~~~~~~~~~~~^~~~~~~~~~~
      |                       |
      |                       char
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:9:23: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    9 |     printf((i == 'G') ? 'C' : 'G');
      |            ~~~~~~~~~~~^~~~~~~~~~~
      |                       |
      |                       char
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: 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:13: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"T"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   10 |   else if(b = "T"){
      |           ~~^~~~~
      |             |
      |             std::__cxx11::basic_string<char>
a.cc:13:13: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"C"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |   else if(b = "C"){
      |           ~~^~~~~
      |             |
      |             std::__cxx11::basic_string<char>
a.cc:16:13: error: could not convert 'b.std::__cxx11::basic_string<char>::operator=(((const char*)"G"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   16 |   else if(b = "G"){
      |           ~~^~~~~
      |             |
      |             std::__cxx11::basic_string<char>
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 if(b = G){
  cout << "C" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'A' was not declared in this scope
    7 |   if(b = A){
      |          ^
a.cc:10:15: error: 'T' was not declared in this scope
   10 |   else if(b = T){
      |               ^
a.cc:13:15: error: 'C' was not declared in this scope
   13 |   else if(b = C){
      |               ^
a.cc:16:15: error: 'G' was not declared in this scope
   16 |   else if(b = G){
      |               ^
Language: C++

#include<iostream>
#include<string>
#include<map>
using namespace std;
int main(){
  string S;
  cin >> S;
  string before = "ATDC";
  string after = "TACD";
  map <char,char> m;
  for(int i=0;i<4;i++){
    m[before[i]] = after[i];
  }
  string ans = m[S[0]];
  cout << ans << endl;
}
 


Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: conversion from 'std::map<char, char>::mapped_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   14 |   string ans = m[S[0]];
      |                      ^
Language: C++

#include<iostream>
#include<string>
#include<map>
using namespace std;
int main(){
  string S;
  cin >> S;
  string before = "ATDC";
  string after = "TACD";
  map <char,char> m;
  for(int i=0;i<4;i++){
    m[before[i]] = after[i]
  }
  string ans = m[S[0]];
  cout << ans << endl;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: expected ';' before '}' token
   12 |     m[before[i]] = after[i]
      |                            ^
      |                            ;
   13 |   }
      |   ~                         
a.cc:14:22: error: conversion from 'std::map<char, char>::mapped_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   14 |   string ans = m[S[0]];
      |                      ^
Language: C++

#include <stdio.h>

int main(int argc, char *argv[]){
  /*if(argv[1] == 'A' || argv[1] == 'T'){
    return (argv[1] == 'A') ? 'T' : 'A';
  }else{
    return (argv[1] == 'G') ? 'C' : 'G';
  }*/
  printf('A');
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:9:10: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    9 |   printf('A');
      |          ^~~
      |          |
      |          char
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

int main(int argc, char *argv[]){
  /*if(argv[1] == 'A' || argv[1] == 'T'){
    return (argv[1] == 'A') ? 'T' : 'A';
  }else{
    return (argv[1] == 'G') ? 'C' : 'G';
  }*/
  print('A');
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:7:3: error: 'print' was not declared in this scope; did you mean 'int'?
    7 |   print('A');
      |   ^~~~~
      |   int
Language: C++

int main(int argc, char *argv[]){
  /*if(argv[1] == 'A' || argv[1] == 'T'){
    return (argv[1] == 'A') ? 'T' : 'A';
  }else{
    return (argv[1] == 'G') ? 'C' : 'G';
  }*/
  return argv[0];
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:7:16: error: invalid conversion from 'char*' to 'int' [-fpermissive]
    7 |   return argv[0];
      |          ~~~~~~^
      |                |
      |                char*
Language: C++

#include <stdio.h>

int main(int argc, char *argv[]){
  if(argv[1] == 'A' || argv[1] == 'T'){
    return (argv[1] == 'A') ? 'T' : 'A';
  }else{
    return (argv[1] == 'G') ? 'C' : 'G';
  }
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:4:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    4 |   if(argv[1] == 'A' || argv[1] == 'T'){
      |      ~~~~~~~~^~~~~~
a.cc:4:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    4 |   if(argv[1] == 'A' || argv[1] == 'T'){
      |                        ~~~~~~~~^~~~~~
a.cc:5:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |     return (argv[1] == 'A') ? 'T' : 'A';
      |             ~~~~~~~~^~~~~~
a.cc:7:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |     return (argv[1] == 'G') ? 'C' : 'G';
      |             ~~~~~~~~^~~~~~
Language: C++

#include <stdio.h>

int main(int argc, char *argv[]){
  if(&argv[0] == 'A' || &argv[0] == 'T'){
    return (&argv[0] == 'A') ? 'T' : 'A';
  }else{
    return (&argv[0] == 'G') ? 'C' : 'G';
  }
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:4:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    4 |   if(&argv[0] == 'A' || &argv[0] == 'T'){
      |      ~~~~~~~~~^~~~~~
a.cc:4:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    4 |   if(&argv[0] == 'A' || &argv[0] == 'T'){
      |                         ~~~~~~~~~^~~~~~
a.cc:5:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |     return (&argv[0] == 'A') ? 'T' : 'A';
      |             ~~~~~~~~~^~~~~~
a.cc:7:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |     return (&argv[0] == 'G') ? 'C' : 'G';
      |             ~~~~~~~~~^~~~~~
Language: C++

#include <stdio.h>

int main(int argc, char* argv[]){
  if(argv[0] == 'A' || argv[0] == 'T'){
    return (argv[0] == 'A') ? 'T' : 'A';
  }else{
    return (argv[0] == 'G') ? 'C' : 'G';
  }
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:4:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    4 |   if(argv[0] == 'A' || argv[0] == 'T'){
      |      ~~~~~~~~^~~~~~
a.cc:4:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    4 |   if(argv[0] == 'A' || argv[0] == 'T'){
      |                        ~~~~~~~~^~~~~~
a.cc:5:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |     return (argv[0] == 'A') ? 'T' : 'A';
      |             ~~~~~~~~^~~~~~
a.cc:7:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |     return (argv[0] == 'G') ? 'C' : 'G';
      |             ~~~~~~~~^~~~~~
Language: C++

#include <stdio.h>

int main(int argc, char *argv[]){
  if(argv[0] == 'A' || argv[0] == 'T'){
    return (argv[0] == 'A') ? 'T' : 'A';
  }else{
    return (argv[0] == 'G') ? 'C' : 'G';
  }
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:4:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    4 |   if(argv[0] == 'A' || argv[0] == 'T'){
      |      ~~~~~~~~^~~~~~
a.cc:4:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    4 |   if(argv[0] == 'A' || argv[0] == 'T'){
      |                        ~~~~~~~~^~~~~~
a.cc:5:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |     return (argv[0] == 'A') ? 'T' : 'A';
      |             ~~~~~~~~^~~~~~
a.cc:7:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |     return (argv[0] == 'G') ? 'C' : 'G';
      |             ~~~~~~~~^~~~~~
Language: C

#include<stdio.h>
int main(){

	char a,b;

	scanf("%s", &a);

	switch (a) {
		case :'A'
			b = 'T';
	      break;
	      case :'T'
	    	b = 'A';
	      break;
	      case :'G'
	    	b = 'C';
	      break;
	      case :'C'
	    	b = 'G';
	      break;
	      default:
	      // do something
	  }

	printf("%s\n",b);

	}

Compiler output:
main.c: In function 'main':
main.c:9:22: error: expected expression before ':' token
    9 |                 case :'A'
      |                      ^
main.c:9:26: error: expected ';' before 'b'
    9 |                 case :'A'
      |                          ^
      |                          ;
   10 |                         b = 'T';
      |                         ~ 
main.c:12:20: error: expected expression before ':' token
   12 |               case :'T'
      |                    ^
main.c:12:24: error: expected ';' before 'b'
   12 |               case :'T'
      |                        ^
      |                        ;
   13 |                 b = 'A';
      |                 ~       
main.c:15:20: error: expected expression before ':' token
   15 |               case :'G'
      |                    ^
main.c:15:24: error: expected ';' before 'b'
   15 |               case :'G'
      |                        ^
      |                        ;
   16 |                 b = 'C';
      |                 ~       
main.c:18:20: error: expected expression before ':' token
   18 |               case :'C'
      |                    ^
main.c:18:24: error: expected ';' before 'b'
   18 |               case :'C'
      |                        ^
      |                        ;
   19 |                 b = 'G';
      |                 ~
Language: C

#include<stdio.h>
int main(){

	char ,b;

	scanf("%s", &a);

	switch (a) {
		case :'A'
			b = 'T';
	      break;
	      case :'T'
	    	b = 'A';
	      break;
	      case :'G'
	    	b = 'C';
	      break;
	      case :'C'
	    	b = 'G';
	      break;
	      default:
	      // do something
	  }

	printf("%s\n",b);

	}

Compiler output:
main.c: In function 'main':
main.c:4:14: error: expected identifier or '(' before ',' token
    4 |         char ,b;
      |              ^
main.c:6:22: error: 'a' undeclared (first use in this function)
    6 |         scanf("%s", &a);
      |                      ^
main.c:6:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:22: error: expected expression before ':' token
    9 |                 case :'A'
      |                      ^
main.c:9:26: error: expected ';' before 'b'
    9 |                 case :'A'
      |                          ^
      |                          ;
   10 |                         b = 'T';
      |                         ~ 
main.c:12:20: error: expected expression before ':' token
   12 |               case :'T'
      |                    ^
main.c:12:24: error: expected ';' before 'b'
   12 |               case :'T'
      |                        ^
      |                        ;
   13 |                 b = 'A';
      |                 ~       
main.c:15:20: error: expected expression before ':' token
   15 |               case :'G'
      |                    ^
main.c:15:24: error: expected ';' before 'b'
   15 |               case :'G'
      |                        ^
      |                        ;
   16 |                 b = 'C';
      |                 ~       
main.c:18:20: error: expected expression before ':' token
   18 |               case :'C'
      |                    ^
main.c:18:24: error: expected ';' before 'b'
   18 |               case :'C'
      |                        ^
      |                        ;
   19 |                 b = 'G';
      |                 ~       
main.c:25:23: error: 'b' undeclared (first use in this function)
   25 |         printf("%s\n",b);
      |                       ^
Language: C

#include <stdio.h>
int main(int argc, char **argv)
{
  char c;
  c = getchar();
  swhich(c) {
    case 'A':
    putchar('T');
    break;
    case 'T':
    putchar('A');
    break;
    case 'G':
    putchar('C');
    break;
    case 'C':
    putchar('G');
    break;
  }
  return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'swhich' [-Wimplicit-function-declaration]
    6 |   swhich(c) {
      |   ^~~~~~
main.c:6:12: error: expected ';' before '{' token
    6 |   swhich(c) {
      |            ^~
      |            ;
Language: Java

package test;

import java.util.Scanner;

public class AtCoder {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            String s = sc.nextLine();
            switch (s) {
                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");
                    break;
            }
        }
    }
}


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

#include <stdio.h>

void main(void)
{
 	char b;
	scanf("%c",&b);
  	char out;
  	switch(b):
	case 'A':
  		out = 'T';
  		break;
	case 'C':
  		out = 'G';
  		break;
    case 'G':
  		out = 'C';
  		break;
    case 'T':
  		out = 'A';
  		break;
  
  printf("%c\n",out);
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main(void)
      | ^~~~
a.cc: In function 'int main()':
a.cc:8:18: error: expected primary-expression before ':' token
    8 |         switch(b):
      |                  ^
a.cc:11:17: error: break statement not within loop or switch
   11 |                 break;
      |                 ^~~~~
a.cc:12:9: error: case label ''C'' not within a switch statement
   12 |         case 'C':
      |         ^~~~
a.cc:14:17: error: break statement not within loop or switch
   14 |                 break;
      |                 ^~~~~
a.cc:15:5: error: case label ''G'' not within a switch statement
   15 |     case 'G':
      |     ^~~~
a.cc:17:17: error: break statement not within loop or switch
   17 |                 break;
      |                 ^~~~~
a.cc:18:5: error: case label ''T'' not within a switch statement
   18 |     case 'T':
      |     ^~~~
a.cc:20:17: error: break statement not within loop or switch
   20 |                 break;
      |                 ^~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
string str;
while(cin>>str)
{
switch(str)
{
case 'A':cout<<"T";break;
case 'T':cout<<"A";break;
case 'C':cout<<"G";break;
default:cout<<"C";
}
}
rerurn 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: switch quantity not an integer
    9 | switch(str)
      |        ^~~
a.cc:17:1: error: 'rerurn' was not declared in this scope
   17 | rerurn 0;
      | ^~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
string str;
while(cin>>str)
{
switch(str)
{
case 'A':cout<<"T";break;
case 'T':cout<<"A";break;
case 'C':cout<<"G";break;
default:cout<<"C";
}
]
rerurn 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: switch quantity not an integer
    9 | switch(str)
      |        ^~~
a.cc:16:1: error: expected primary-expression before ']' token
   16 | ]
      | ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main{
  char b,A,C,T,G;
  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:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:3: error: expected primary-expression before 'char'
    4 |   char b,A,C,T,G;
      |   ^~~~
a.cc:4:3: error: expected '}' before 'char'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin>>b;
      |   ^~~
a.cc:6:3: error: expected unqualified-id before 'if'
    6 |   if(b=='A'){
      |   ^~
a.cc:9:3: error: expected unqualified-id before 'if'
    9 |   if(b=='T'){
      |   ^~
a.cc:12:3: error: expected unqualified-id before 'if'
   12 |   if(b=='C'){
      |   ^~
a.cc:15:3: error: expected unqualified-id before 'if'
   15 |   if(b=='G'){
      |   ^~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include<bits/c++.h>
using namespace std;
int main{
  char b,A,C,T,G;
  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:1:9: fatal error: bits/c++.h: No such file or directory
    1 | #include<bits/c++.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include <stdio.h>
 
int main( void )
{
	char s[1+1];
	scanf("%s", s ) ;
	printf( s[0] == 'A' ? "C\n" : (s[0] == 'C' ? 'G' : (s[0] == 'G' ? 'C' : 'A')))) ;
	return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: operands to '?:' have different types 'const char*' and 'char'
    7 |         printf( s[0] == 'A' ? "C\n" : (s[0] == 'C' ? 'G' : (s[0] == 'G' ? 'C' : 'A')))) ;
      |                 ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C

1 #include <stdio.h>

3 int main(void)
{
	4 char b, c[128];
	5 c['A'] = 'G';
	6 c['G'] = 'A';
	7 c['C'] = 'T';
	8 c['T'] = 'C';
	9 cin >> b;
	10 cout << c[(int)b] << endl;
	11
}

Compiler output:
main.c:1:1: error: expected identifier or '(' before numeric constant
    1 | 1 #include <stdio.h>
      | ^
main.c:1:3: error: stray '#' in program
    1 | 1 #include <stdio.h>
      |   ^
Language: C

 #include <iostream>
 using namespace std;
 int main(){
 char b, c[128];
 c['A'] = 'G';
 c['G'] = 'A';
 c['C'] = 'T';
 c['T'] = 'C';
 cin >> b;
 cout << c[(int)b] << endl;
 }

Compiler output:
main.c:1:11: fatal error: iostream: No such file or directory
    1 |  #include <iostream>
      |           ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

int main(void)
{
	int A, T, C, G;
	int b;
	scanf_S("%d, &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:7:9: error: implicit declaration of function 'scanf_S'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |         scanf_S("%d, &b");
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>

int main(void)
{int A,T,C,G;
 int b;
 
 scanf_S("%d, &b");
 if (no = A)
   printf("T");
 if (no = T)
   printf("A");
 if (no = G)
   printf("C");
 if (no = C)
   printf("G");
 
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:2: error: implicit declaration of function 'scanf_S'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |  scanf_S("%d, &b");
      |  ^~~~~~~
      |  scanf
main.c:8:6: error: 'no' undeclared (first use in this function)
    8 |  if (no = A)
      |      ^~
main.c:8:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

include <stdio>

int main()
{
  char enki;
  char enki_tui;
  scanf("%c", &enki);
  if(enki == "A")
  {
    enki_tui = "T";
    printf("%c%, enki_tui);
  }
  if(enki == "T")
  {
    enki_tui = "A";
    printf("%c%, enki_tui);
  }
  if(enki == "C")
  {
    enki_tui = "G";
    printf("%c%, enki_tui);
  }
  if(enki == "G")
  {
    enki_tui = "C";
    printf("%c%, enki_tui);
  }
  return 0;
}


Compiler output:
a.cc:11:12: warning: missing terminating " character
   11 |     printf("%c%, enki_tui);
      |            ^
a.cc:11:12: error: missing terminating " character
   11 |     printf("%c%, enki_tui);
      |            ^~~~~~~~~~~~~~~~
a.cc:16:12: warning: missing terminating " character
   16 |     printf("%c%, enki_tui);
      |            ^
a.cc:16:12: error: missing terminating " character
   16 |     printf("%c%, enki_tui);
      |            ^~~~~~~~~~~~~~~~
a.cc:21:12: warning: missing terminating " character
   21 |     printf("%c%, enki_tui);
      |            ^
a.cc:21:12: error: missing terminating " character
   21 |     printf("%c%, enki_tui);
      |            ^~~~~~~~~~~~~~~~
a.cc:26:12: warning: missing terminating " character
   26 |     printf("%c%, enki_tui);
      |            ^
a.cc:26:12: error: missing terminating " character
   26 |     printf("%c%, enki_tui);
      |            ^~~~~~~~~~~~~~~~
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio>
      | ^~~~~~~
Language: C++

include <stdio>

int main()
{
  char enki;
  char enki_tui;
  scanf("%c", &enki);
  if(enki == "A")
  {
    enki_tui = "T";
    printf("%c, enki_tui);
  }
  if(enki == "T")
  {
    enki_tui = "A";
    printf("%c, enki_tui);
  }
  if(enki == "C")
  {
    enki_tui = "G";
    printf("%c, enki_tui);
  }
  if(enki == "G")
  {
    enki_tui = "C";
    printf("%c, enki_tui);
  }
  return 0;
}


Compiler output:
a.cc:11:12: warning: missing terminating " character
   11 |     printf("%c, enki_tui);
      |            ^
a.cc:11:12: error: missing terminating " character
   11 |     printf("%c, enki_tui);
      |            ^~~~~~~~~~~~~~~
a.cc:16:12: warning: missing terminating " character
   16 |     printf("%c, enki_tui);
      |            ^
a.cc:16:12: error: missing terminating " character
   16 |     printf("%c, enki_tui);
      |            ^~~~~~~~~~~~~~~
a.cc:21:12: warning: missing terminating " character
   21 |     printf("%c, enki_tui);
      |            ^
a.cc:21:12: error: missing terminating " character
   21 |     printf("%c, enki_tui);
      |            ^~~~~~~~~~~~~~~
a.cc:26:12: warning: missing terminating " character
   26 |     printf("%c, enki_tui);
      |            ^
a.cc:26:12: error: missing terminating " character
   26 |     printf("%c, enki_tui);
      |            ^~~~~~~~~~~~~~~
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio>
      | ^~~~~~~
Language: C++

#include <iostream>
namespace std;

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

Compiler output:
a.cc:2:14: error: expected '{' before ';' token
    2 | namespace std;
      |              ^
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:5: 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
      |                  ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     cout << 'A';
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     cout << 'G';
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:19:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |     cout << 'C';
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

B = gets.chomp
 
puts "T" if B == "A"
puts "A" if B == "T"
puts "C" if B == "G"
puts "G" if B == "C"

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | B = gets.chomp
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'B' [-Wimplicit-int]
main.c:1:5: error: 'gets' undeclared here (not in a function)
    1 | B = gets.chomp
      |     ^~~~
main.c:3:1: error: expected ',' or ';' before 'puts'
    3 | puts "T" if B == "A"
      | ^~~~
Language: C++

#include<iostream>

using namespace std;
{
  char ch;
  cin>>ch;
  if(ch=='A')
    cout<<'T'<<endl;
  else if(ch=='T')
    cout<<'A'<<endl;
  else if(ch=='G')
    cout<<'C'<<endl;
  else if(ch=='C')
    cout<<'G'<<endl;
 return 0;
}

Compiler output:
a.cc:4:1: error: expected unqualified-id before '{' token
    4 | {
      | ^
Language: C++

#include <cstdio>
#include <iostream>

using namespace std;

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

Compiler output:
a.cc:11:14: warning: missing terminating ' character
   11 |     cout<<'T'';
      |              ^
a.cc:11:14: error: missing terminating ' character
   11 |     cout<<'T'';
      |              ^~
a.cc:13:14: warning: missing terminating ' character
   13 |     cout<<'A'';
      |              ^
a.cc:13:14: error: missing terminating ' character
   13 |     cout<<'A'';
      |              ^~
a.cc:15:14: warning: missing terminating ' character
   15 |     cout<<'C'';
      |              ^
a.cc:15:14: error: missing terminating ' character
   15 |     cout<<'C'';
      |              ^~
a.cc: In function 'int main()':
a.cc:11:14: error: expected ';' before 'else'
   11 |     cout<<'T'';
      |              ^
      |              ;
   12 |   else if(ch=='T')
      |   ~~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    string s;
    cin >> s;
    string ans;
    switch(s){
        case "A":
            ans = "T";
        break;
        case "T":
            ans = "A";
            break;
        case "C":
            ans = "G";
            break;
        case "G":
            ans = "C";
        break;
    }
    
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: switch quantity not an integer
    7 |     switch(s){
      |            ^
Language: C++

#include <iostream>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string b;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> b;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:10: error: 'b' was not declared in this scope
    6 |   cin >> b;
      |          ^
a.cc:7:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   if(b=="A") cout << "T";
      |              ^~~~
      |              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:19: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   else if(b=="T") cout << "A";
      |                   ^~~~
      |                   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:19: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   else if(b=="G") cout << "C";
      |                   ^~~~
      |                   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:19: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   else if(b=="C") cout << "G";
      |                   ^~~~
      |                   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a={"A":"T","T":"A","G":"C","C":"G"}
      | ^
a.cc:2:6: error: expected constructor, destructor, or type conversion before '(' token
    2 | print(a[input()])
      |      ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

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


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

#include<stdio.h>

int main(void){
  char a[256];
  scanf("%s",a);
  if(a==A){
    printf("T");
  }else if(a==C){
    printf("G");
  }else if(a==G){
    printf("C");
  }else{
    printf("A");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'A' undeclared (first use in this function)
    6 |   if(a==A){
      |         ^
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:15: error: 'C' undeclared (first use in this function)
    8 |   }else if(a==C){
      |               ^
main.c:10:15: error: 'G' undeclared (first use in this function)
   10 |   }else if(a==G){
      |               ^
Language: C++

#include<iostream>
using namespace std;

char word(char b){
	char A,T,C,G;
	if(b == A)return T;
	if(b == T)return A;
	if(b == C)return G;
	if(b == G)return C;
}


int main()
	char b;
	cin >> b;
	cout << word(b) << endl;
	return 0;
}


Compiler output:
a.cc:14:9: error: expected initializer before 'char'
   14 |         char b;
      |         ^~~~
a.cc:15:9: error: 'cin' does not name a type
   15 |         cin >> b;
      |         ^~~
a.cc:16:9: error: 'cout' does not name a type
   16 |         cout << word(b) << endl;
      |         ^~~~
a.cc:17:9: error: expected unqualified-id before 'return'
   17 |         return 0;
      |         ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
a.cc: In function 'char word(char)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
Language: C++

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

int main(){
	char b;
	cin>>b;
  
	char s[]="ACGT";
	int i=0;
	while(b-s[i]){
		i++;
	}
  
	cout<<s[3-i]<<endl;
    return 0
}//abc122_a.復習.参考.

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected ';' before '}' token
   15 |     return 0
      |             ^
      |             ;
   16 | }//abc122_a.復習.参考.
      | ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: 'A' was not declared in this scope
    6 | if(M=A){cout<<"T"<<endl;
      |      ^
a.cc:7:21: error: 'T' was not declared in this scope
    7 |          }else if(M=T){cout<<"A"<<endl;
      |                     ^
a.cc:8:36: error: 'C' was not declared in this scope
    8 |                         }else if(M=C){cout<<"G"<<endl;
      |                                    ^
a.cc:9:51: error: 'G' was not declared in this scope
    9 |                                        }else if(M=G){cout<<"C"<<endl;
      |                                                   ^
Language: C++

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

int main () {
  char 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'IF' was not declared in this scope
   10 |   IF(x == 'G') cout<<"C"<<endl;
      |   ^~
Language: C++

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

int main(){
    map<string,string> mp;
    mp["A"]="T";mp["T"]="A",mp["C"]"G",mp["G"]="C";
    string s;
    cin >> s;
    cout << mp[s];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:36: error: expected ';' before string constant
    6 |     mp["A"]="T";mp["T"]="A",mp["C"]"G",mp["G"]="C";
      |                                    ^~~
      |                                    ;
Language: Java

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        if (s.equals("A")) System.out.println("T");
        if (s.equals("T")) System.out.println("A");
        if (s.equals("C")) System.out.println("G");
        if (s.equals("G")) System.out.println("C");
        sc.close();
    }
}

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

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if (s.equals("A")) System.out.println("T");
        if (s.equals("T")) System.out.println("A");
        if (s.equals("C")) System.out.println("G");
        if (s.equals("G")) System.out.println("C");
        sc.close();
    }
}


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

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if (s.equals("A")) System.out.println("T");
        if (s.equals("T")) System.out.println("A");
        if (s.equals("C")) System.out.println("G");
        if (s.equals("G")) System.out.println("C");
    }
}


Compiler output:
Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
       ^
1 error