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

#include<iostream>
#include<string.h>
#include<cstdio>
using namespace std;

int main(){
  string str;
  cin >> str;
  int l = strlen(str);
  for(int i = l - 1; i >= 0; i--){
    cout << str[i];
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    9 |   int l = strlen(str);
      |                  ^~~
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
In file included from a.cc:2:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

#include<iostream>
#include<string.h>
#include<cstdio>
using namespace std;

int main(){
  string str;
  cin >> str;
  int l = (int)strlen(str);
  for(int i = l - 1; i >= 0; i--){
    cout << str[i];
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    9 |   int l = (int)strlen(str);
      |                       ^~~
      |                       |
      |                       std::string {aka std::__cxx11::basic_string<char>}
In file included from a.cc:2:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

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

int main(){
  char str;
  cin >> str;
  int l = strlen(str);
  for(int i = l - 1; i >= 0; i--){
    cout << str[i];
  }
  cout << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    8 |   int l = strlen(str);
      |                  ^~~
      |                  |
      |                  char
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:2:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:10:16: error: invalid types 'char[int]' for array subscript
   10 |     cout << str[i];
      |                ^
Language: C++

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

int main(){
string str;
cin>>str;
reverse(str.begin(),str.end());
cout<<str<<endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: 'reverse' was not declared in this scope
    8 | reverse(str.begin(),str.end());
      | ^~~~~~~
Language: C++

#include<iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int main() {

	char str[20];
	int i, len;

	cin >> str;
	len = strlen(str);

	for (i = len - 1; i >= 0; i--)
		cout << str[i] << endl;

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'strlen' was not declared in this scope
   13 |         len = strlen(str);
      |               ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 |
Language: C++

#include<iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int main() {

	char str[20];
	int i, len;

	cin >> str;
	len = strlen(str);

	for (i = len - 1; i >= 0; i--)
		cout << str[i];

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'strlen' was not declared in this scope
   13 |         len = strlen(str);
      |               ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 |
Language: C++

#include<iostream>
#include <algorithm>

using namespace std;

int main() {

	char str[20];
	int i, len;

	cin >> str;
	len = strlen(str);

	for (i = len - 1; i >= 0; i--)
		cout << str[i];

	putchar('\n');

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'strlen' was not declared in this scope
   12 |         len = strlen(str);
      |               ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <algorithm>
  +++ |+#include <cstring>
    3 |
Language: C++

#include<iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int main() {

	char str[20];
	int i, len;

	cin >> str;
	len = strlen(str);

	for (i = len - 1; i >= 0; i--)
		cout << str[i];

	putchar('\n');

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'strlen' was not declared in this scope
   13 |         len = strlen(str);
      |               ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 |
Language: C++

#include<iostream>
#include <cstdio>
#include <algorithm>
#include <string>

using namespace std;

int main() {

	char str[20];
	int i, len;

	cin >> str;
	len = strlen(str);

	for (i = len - 1; i >= 0; i--)
		cout << str[i];

	putchar('\n');

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: 'strlen' was not declared in this scope
   14 |         len = strlen(str);
      |               ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 | #include <string>
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
	char str[25];
	int i, num;
	
	cin >> str;

	num = strlen(str);

	for(i = num - 1; i >= 0; i --){
		cout << str[i];
	}
	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'strlen' was not declared in this scope
   12 |         num = strlen(str);
      |               ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
	char str[25];
	int i, num;
	
	cin >> str;

	num = strlen(str);

	for(i = num-1; i >= 0; i--){
		cout << str[i];
	}
	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'strlen' was not declared in this scope
   12 |         num = strlen(str);
      |               ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

#include<iostream>
#include<stdio.h>
#include<string>
using namespace std;

int main(){
    char str[25];
    cin>>str;
    for(int i=strlen(str); i>=0; i--){
        cout<<str[i];}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'strlen' was not declared in this scope
    9 |     for(int i=strlen(str); i>=0; i--){
      |               ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<stdio.h>
Language: C++

#include<iostream>
#include<stdio.h>
#include<string>
using namespace std;

int main(){
    char str[25];
    cin>>str;
    for(long i=strlen(str); i>=0; i--){
        cout<<str[i];}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'strlen' was not declared in this scope
    9 |     for(long i=strlen(str); i>=0; i--){
      |                ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<stdio.h>
Language: C++

#include <iostream>

#define MAX 20

using namespace std;

int main() {
	char str[MAX];
	cin >> str;

	int len = strlen(str);
	for (int i = len - 1; i >= 0; i--) {
		cout << str[i];
	}
	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'strlen' was not declared in this scope
   11 |         int len = strlen(str);
      |                   ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>
#include <string>

#define MAX 20

using namespace std;

int main() {
	char str[MAX];
	cin >> str;

	int len = strlen(str);
	for (int i = len - 1; i >= 0; i--) {
		cout << str[i];
	}
	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'strlen' was not declared in this scope
   12 |         int len = strlen(str);
      |                   ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

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

long long int gcd(long long int l, long long int r) {
	assert(l > 0 && r > 0);
	if (l > r)return gcd(r, l);
	else {
		const long long int num = r%l;
		if (num) {
			return gcd(l, num);
		}
		else {
			return l;
		}
	}
}
long long int lca(long long int l, long long int r) {
	return l / gcd(l, r)*r;
}
int main() {
	string st; cin >> st;
	reverse(st.begin(), st.end());%
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:39: error: expected primary-expression before '%' token
   22 |         reverse(st.begin(), st.end());%
      |                                       ^
a.cc:23:9: error: expected primary-expression before 'return'
   23 |         return 0;
      |         ^~~~~~
Language: C++

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

int main() {
char a[21];
scanf("%s",a);
int b=strlen(a);
for(int c=b-1;c!=-1;c--)printf("a[c]");
printf("\n");
}

Compiler output:
a.cc:1:10: fatal error: bits/stdcc++.h: No such file or directory
    1 | #include <bits/stdcc++.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
char a[21];
scanf("%s",a);
int b=strlen(a);
for(int c=b-1;c!=-1;c--)printf("%c",a[c]);
printf("\n");
}

Compiler output:
a.cc:1:10: fatal error: bits/stdcc++.h: No such file or directory
    1 | #include <bits/stdcc++.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
//ranker
using namespace std;

using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
using pis = pair<int, string>;
using psi = pair<string, int>;
using D = double;
using P = complex<D>;
template <typename T> using PQ = priority_queue<T>;
template <typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>;


int main()
{
    string str;

    cin >> str;
    reverse( str.begin() , str.end() );
    cout << str << endl;

    return 0;
}

Compiler output:
a.cc:19:11: error: 'complex' does not name a type
   19 | using P = complex<D>;
      |           ^~~~~~~
a.cc:20:34: error: 'priority_queue' does not name a type
   20 | template <typename T> using PQ = priority_queue<T>;
      |                                  ^~~~~~~~~~~~~~
a.cc:21:37: error: 'priority_queue' does not name a type
   21 | template <typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>;
      |                                     ^~~~~~~~~~~~~~
Language: C++

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

int main()
{
	string s;
	cin >> s;
	reverse(s.begin(), s.end());
	cout << s << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'reverse' was not declared in this scope
    9 |         reverse(s.begin(), s.end());
      |         ^~~~~~~
Language: C++

#include <iostream>
#include <string>

int main(){
  string str;
  int num;
  
  std::cin >> str;
  num = str.length();
  
  for(int i=num-1; i>=0; i--){
    std::cout << str[i];
  }
  std::cout << std::endl;

  return 0;
}

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

#include<iostream> 
using namespace std; 

int main() {
	char str[21];
	cin >> str;
	int length = strlen(str),x;
	for (int i = 0; i < length; i++){
		x = length - i-1;
		cout <<str[x];
	}
	cout << "\n";

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'strlen' was not declared in this scope
    7 |         int length = strlen(str),x;
      |                      ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
a.cc:9:17: error: 'x' was not declared in this scope
    9 |                 x = length - i-1;
      |                 ^
Language: C++

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

int main() {
	char str[21];
	cin >> str;
	int length = strlen(str),x;
	for (int i = 0; i < length; i++){
		x = length - i-1;
		cout <<str[x];
	}
	cout << "\n";
	cin >> x;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: 'strlen' was not declared in this scope
    8 |         int length = strlen(str),x;
      |                      ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
a.cc:10:17: error: 'x' was not declared in this scope
   10 |                 x = length - i-1;
      |                 ^
a.cc:14:16: error: 'x' was not declared in this scope
   14 |         cin >> x;
      |                ^
Language: C++

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

int main() {
	char str[21];
	cin >> str;
	int length = strlen(str);
	int x;
	for (int i = 0; i < length; i++){
		x = length - i - 1;
		cout <<str[x];
	}
	cout << "\n";

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: 'strlen' was not declared in this scope
    8 |         int length = strlen(str);
      |                      ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

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

int main() {
	char str[21];
	cin >> str;
	int length = std::strlen(str);
	int x;
	for (int i = 0; i < length; i++){
		x = length - i - 1;
		cout <<str[x];
	}
	cout << "\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'?
    8 |         int length = std::strlen(str);
      |                           ^~~~~~
      |                           mbrlen
Language: C++

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

int main() {
	char str[21];
	cin >> str;
	int length = std::strlen(str);
	int x;
	for (int i = 0; i < length; i++){
		x = length - i - 1;
		cout <<str[x];
	}
	cout << "\0\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'?
    8 |         int length = std::strlen(str);
      |                           ^~~~~~
      |                           mbrlen
Language: C++

#include<iostream>
//#include<algorithm>
//#include<cmath>
#include<string>
//#include<cctype>
//#include <vector>
using namespace std;
int main(){
	string s;
	cin >> s;
	reverse(s.begin(), s.end());
	cout << s << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'reverse' was not declared in this scope
   11 |         reverse(s.begin(), s.end());
      |         ^~~~~~~
Language: C++

#include<iostream>
#include<string.h>
using namespace std;
int main()
{
	char a[30];
	while (cin >> a)
	{
		strrev(a);
		cout << a << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
    9 |                 strrev(a);
      |                 ^~~~~~
      |                 strsep
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
	char a[20] = {};
	char b[20] = {};
	cin >> a;
	for (int i = 0; i < strlen(a); i++) {
		b[i] = a[strlen(a) - i];
	}
	cout << b << endl;
	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: 'strlen' was not declared in this scope
    9 |         for (int i = 0; i < strlen(a); i++) {
      |                             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
	char a[20] = {};
	char b[20] = {};
	int alen;
	cin >> a;
	alen = strlen(a);
	for (int i = 0; i < alen; i++) {
		b[i] = a[alen - i-1];
	}
	cout << b << endl;
	

	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'strlen' was not declared in this scope
   10 |         alen = strlen(a);
      |                ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
	char a[21] = {};
	char b[21] = {};
	int alen = 0;
	cin >> a;
	alen = strlen(a);
	for (int i = 0; i < alen; i++) {
		b[i] = a[alen - i-1];
	}
	cout << b << endl;
	

	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'strlen' was not declared in this scope
   10 |         alen = strlen(a);
      |                ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
	char a[21] = {};
	char b[21] = {};
	int alen = 0;
	cin >> a;
	alen = strlen(a);
	for (int i = 0; alen >= 0; alen--, i++) {
		b[i] = a[alen -1];
	}
	cout << b << endl;
	

	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'strlen' was not declared in this scope
   10 |         alen = strlen(a);
      |                ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

#include <iostream>
#include <algorithm>
#include <stdlib.h>
#include <iomanip>
#include <String>
#include <cmath>
#define PI 3.14159265359
using namespace std;

int main()
{
	char tmpstr[20];
	cin >> tmpstr;
	string str(tmpstr);
	auto itr = str.end() - 1;
	for (; itr > str.begin(); --itr) {
		cout << *itr;
	}
	cout << *itr << endl;
	return 0;
}

Compiler output:
a.cc:5:10: fatal error: String: No such file or directory
    5 | #include <String>
      |          ^~~~~~~~
compilation terminated.
Language: C++

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

int main(){
    string s;
    cin>>s;
    int n;
    n=strlen(s);
    char a[n];
    for(int i=0;i<n;i++){
        a[i]=s[i];
    }
    for(int i=n-1;i>=0;i--){
        s[i]=a[i];
    }
    cout<<s<<endl;
    return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    8 |     n=strlen(s);
      |              ^
      |              |
      |              std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++


#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;
int main()
{
	string s = "";
	cin >> s;
	for (int i = s.length - 1; i >= 0; i--)
	{
		cout<< s[i];
	}cout << endl;
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   29 |         for (int i = s.length - 1; i >= 0; i--)
      |                      ~~^~~~~~
      |                              ()
Language: C++


#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;
string main()
{
	string s = "";
	cin >> s;
	for (int i = s.length - 1; i >= 0; i--)
	{
		cout << s[i];
	}cout << endl;
	return 0;

}

Compiler output:
a.cc:25:1: error: '::main' must return 'int'
   25 | string main()
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:29:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   29 |         for (int i = s.length - 1; i >= 0; i--)
      |                      ~~^~~~~~
      |                              ()
Language: C++

#include <iostream>

using namespace std;

int main()
{
	char str[20];
	cin >> str;
	int len = strlen(str);
	for (int i = len; i >0; i--)
	{
		cout << str[i-1];
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: 'strlen' was not declared in this scope
    9 |         int len = strlen(str);
      |                   ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>
#include<stdio.h>

using namespace std;

int main()
{
	char str[20];
	cin >> str;
	int len = strlen(str);
	for (int i = len; i >0; i--)
	{
		cout << str[i-1];
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'strlen' was not declared in this scope
   10 |         int len = strlen(str);
      |                   ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include<stdio.h>
Language: C++

#include <iostream>

using namespace std;

int main()
{
	char sr[20];
	cin >> sr;
	int len = strlen(sr);
	for (int i = len; i >0; i--)
	{
		cout << sr[i-1];
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: 'strlen' was not declared in this scope
    9 |         int len = strlen(sr);
      |                   ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>
using namespace std;

int main()
{
	string str,str2="";
	cin >> str;

	for(int i = str.length() - 1; i >= 0; i--)
		str2 += str[i];
	str2 += NULL;
	cout << str2; 
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: ambiguous overload for 'operator+=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'long int')
   11 |         str2 += NULL;
      |              ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1377:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator+=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 1377 |       operator+=(const basic_string& __str)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1387:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator+=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 1387 |       operator+=(const _CharT* __s)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1397:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator+=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 1397 |       operator+=(_CharT __c)
      |       ^~~~~~~~
Language: C++

process.stdin.resume();
process.stdin.setEncoding('utf8');
// Here your code !

process.stdin.on("data",function(chunk){
    console.log(chunk.split("").reverse().join())
})

Compiler output:
a.cc:2:27: warning: multi-character character constant [-Wmultichar]
    2 | process.stdin.setEncoding('utf8');
      |                           ^~~~~~
a.cc:1:1: error: 'process' does not name a type
    1 | process.stdin.resume();
      | ^~~~~~~
a.cc:2:1: error: 'process' does not name a type
    2 | process.stdin.setEncoding('utf8');
      | ^~~~~~~
a.cc:5:1: error: 'process' does not name a type
    5 | process.stdin.on("data",function(chunk){
      | ^~~~~~~
a.cc:7:2: error: expected unqualified-id before ')' token
    7 | })
      |  ^
Language: C++

process.stdin.resume();
process.stdin.setEncoding('utf8');

process.stdin.on("data",function(chunk){
    console.log(chunk.split("").reverse().join())
})

Compiler output:
a.cc:2:27: warning: multi-character character constant [-Wmultichar]
    2 | process.stdin.setEncoding('utf8');
      |                           ^~~~~~
a.cc:1:1: error: 'process' does not name a type
    1 | process.stdin.resume();
      | ^~~~~~~
a.cc:2:1: error: 'process' does not name a type
    2 | process.stdin.setEncoding('utf8');
      | ^~~~~~~
a.cc:4:1: error: 'process' does not name a type
    4 | process.stdin.on("data",function(chunk){
      | ^~~~~~~
a.cc:6:2: error: expected unqualified-id before ')' token
    6 | })
      |  ^
Language: C++

#include "stdafx.h"
#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <numeric>
#include <ctype.h>
#include <cstdlib>
#include <string.h>
#include <cmath>
#include <cstdio>





using namespace std;


int main()
{
	string input, str;

	cin >> input;

	for (auto a : input)
	{
		str.insert(str.begin(), a);
	}

	cout << str << endl;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<math.h>
#include<algorithm>
#include<string.h>
using namespace std;
int main(){
    string x;
    int i;
    cin>>x;
    for(i=x.size();i--){
        cout<<x[i];
    }
    cout<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before ')' token
   10 |     for(i=x.size();i--){
      |                       ^
      |                       ;
Language: C++

#include<iostream>
using namespace std;
	
int main()
{
	char change[19];
	cout<<"??????????????\????????????????????????\n";
	cin>>change[19];
	for(int i=19;i>=0;i--){
	cout<<"change[i];
	}
	return 0;
}

Compiler output:
a.cc:10:15: warning: missing terminating " character
   10 |         cout<<"change[i];
      |               ^
a.cc:10:15: error: missing terminating " character
   10 |         cout<<"change[i];
      |               ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:9: error: expected primary-expression before '}' token
   11 |         }
      |         ^
Language: C++

#include<iostream>
using namespace std;
	
int main()
{
	char change[19];
	cout<<"??????????????\????????????????????????\n";
	cin>>change[19];
	int j=strlen(change);
	j-=1;
	for(int i=j;i>=0;i--){
	cout<<"change[i];
	}
	return 0;
}

Compiler output:
a.cc:12:15: warning: missing terminating " character
   12 |         cout<<"change[i];
      |               ^
a.cc:12:15: error: missing terminating " character
   12 |         cout<<"change[i];
      |               ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:15: error: 'strlen' was not declared in this scope
    9 |         int j=strlen(change);
      |               ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
a.cc:13:9: error: expected primary-expression before '}' token
   13 |         }
      |         ^
Language: C++

#include<iostream>
using namespace std;
	
int main()
{
	char change[19];
	cout<<"??????????????\????????????????????????\n";
	cin>>change[19];
	int j=strlen(change);
	j-=1;
	for(int i=j;i>=0;i--){
	cout<<change[i];
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'strlen' was not declared in this scope
    9 |         int j=strlen(change);
      |               ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	string s;
	cin >> s;
	if(s.size()<=20){
		for(int i=s.size();i>=0;i--){
			cout << s[i-1];
		}
		cout << endl;
		}
}
	return 0;
}

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

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

string ilham, bojos;
int ndaru;
int main(){
	cin >> ilham;
	ndaru = ilham.length();
	for(int i = ndaru-1; i >= 0; i-){
		bojos = bojos + ilham[i];
	}
	cout << bojos << "\n";
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:40: error: expected primary-expression before ')' token
   10 |         for(int i = ndaru-1; i >= 0; i-){
      |                                        ^
Language: C++

#include<iostream>
using namespace std;
void solver() {
    string str;
    cin>>str;
    reverse(str.begin(),str.end());
    cout<<str<<endl;
}

int main() {
    solver();
    return 0;
}

Compiler output:
a.cc: In function 'void solver()':
a.cc:6:5: error: 'reverse' was not declared in this scope
    6 |     reverse(str.begin(),str.end());
      |     ^~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#define N 20
using namespace std;

int main() {
    char str[N];
    cin >> str;
    reverse(str,str+strlen(str));
    printf("%s\n",str);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'strlen' was not declared in this scope
    9 |     reverse(str,str+strlen(str));
      |                     ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 | #define N 20
a.cc:9:5: error: 'reverse' was not declared in this scope
    9 |     reverse(str,str+strlen(str));
      |     ^~~~~~~
Language: C++

#include <iostream>
#include <cstdio>

#define N 20
using namespace std;

int main() {
    char str[N];
    cin >> str;
    reverse(str,str+strlen(str));
    printf("%s\n",str);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'strlen' was not declared in this scope
   10 |     reverse(str,str+strlen(str));
      |                     ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 | 
a.cc:10:5: error: 'reverse' was not declared in this scope
   10 |     reverse(str,str+strlen(str));
      |     ^~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>

#define N 20
using namespace std;

int main() {
    char str[N];
    cin >> str;
    reverse(str,str+strlen(str));
    printf("%s\n",str);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'reverse' was not declared in this scope
   11 |     reverse(str,str+strlen(str));
      |     ^~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>

#define N 20
using namespace std;

int main() {
    char str[N];
    cin >> str;
    reverse(str,str+strlen(str));
    printf("%s\n",str);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: 'strlen' was not declared in this scope
   11 |     reverse(str,str+strlen(str));
      |                     ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 |
Language: C++

#include <iostream>
#include <cstdio>
#include <string>

#define N 20
using namespace std;

int main() {
    char str[N];
    cin >> str;
    reverse(str,str+strlen(str));
    printf("%s\n",str);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: 'strlen' was not declared in this scope
   11 |     reverse(str,str+strlen(str));
      |                     ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 | #include <string>
a.cc:11:5: error: 'reverse' was not declared in this scope
   11 |     reverse(str,str+strlen(str));
      |     ^~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>
#define N 20
using namespace std;

int main() {
    char str[N];
    cin >> str;
    reverse(str,str+strlen(str));
    printf("%s\n",str);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'reverse' was not declared in this scope
   10 |     reverse(str,str+strlen(str));
      |     ^~~~~~~
Language: C++

#include <iostream>
using namaspace std;
int main(){
	char str[20];	
	for (int A=0;A<20;A++)cin>>str[A];
	for (int A=19;A>=0;A--)cout<<str[A];
	cout<<endl;
	return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namaspace'
    2 | using namaspace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:31: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         for (int A=0;A<20;A++)cin>>str[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:6:32: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         for (int A=19;A>=0;A--)cout<<str[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:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         cout<<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:7:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |         cout<<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)
      |     ^~~~
Language: C++

#include <iostream>
using namaspace std;
int main(){
	char str[20],i=-1;
	for (;;){	
		i++;
		while(cin>>str[i]==EOF) break;
	}
	for (int A=i;A>=0;A--)cout<<str[i];
	cout<<endl;
	return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namaspace'
    2 | using namaspace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:23: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |                 while(cin>>str[i]==EOF) break;
      |                       ^~~
      |                       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:9:31: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |         for (int A=i;A>=0;A--)cout<<str[i];
      |                               ^~~~
      |                               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:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout<<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:10:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         cout<<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)
      |     ^~~~
Language: C++

#include<iostream>
#include<cstring>
using namespace std;
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  string str;
  cin>>str;
  reverse(str.begin(),str.end());
  cout<<str<<endl;
  return 0;;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'reverse' was not declared in this scope
    9 |   reverse(str.begin(),str.end());
      |   ^~~~~~~
Language: C++

#include<stdio.h>
#include<string.h>
#include<iostream>
#include<vector>
#include<set>
#include<queue>
#include<ctype.h>
#include<math.h>
#include<map>
using namespace std;
int main() 
{
	char a[21];
	gets(a);
	int len=strlen(a);
	for(int i=len-1;i>=0;i--)
		putchar(a[i]);
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   14 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

#include<iostream>
#include<cstring>
using namespace std;
int main()
{
	char str[30];
	gets(str);
	for(int i=strlen(str)-1;i>=0;i--)
	cout<<str[i];
	cout<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |         gets(str);
      |         ^~~~
      |         getw
Language: C++

//
// Created by Undefined on 2018/2/2.
//

#include <iostream>
#include <cstring>

using namespace std;

int main () {
    char s[21], tmp;
    gets(s);
    for (int i = 0, j = strlen(s) - 1; i < j; i++, j--) {
        tmp = s[i];
        s[i] = s[j];
        s[j] = tmp;
    }
    printf("%s\n", s);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   12 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

// In the name of Allah
#include <stdio.h>
#include <string.h>

int main(){
	char st[21];
	scanf("%s",&st);
	strrev(st);
	printf("%s",st);
	return 0;
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
    8 |         strrev(st);
      |         ^~~~~~
      |         strsep
Language: C++

string = input("input data")
size = len(string)
st = []
for i in range(size):
    st.append(string[size-i-1])
print(''.join(st), end='')



Compiler output:
a.cc:6:7: error: empty character constant
    6 | print(''.join(st), end='')
      |       ^~
a.cc:6:24: error: empty character constant
    6 | print(''.join(st), end='')
      |                        ^~
a.cc:1:1: error: 'string' does not name a type
    1 | string = input("input data")
      | ^~~~~~
Language: C++

string = input("input data")
size = len(string)
st = []
for i in range(size):
    st.append(string[size-i-1])
print(''.join(st), end='')
print('')


Compiler output:
a.cc:6:7: error: empty character constant
    6 | print(''.join(st), end='')
      |       ^~
a.cc:6:24: error: empty character constant
    6 | print(''.join(st), end='')
      |                        ^~
a.cc:7:7: error: empty character constant
    7 | print('')
      |       ^~
a.cc:1:1: error: 'string' does not name a type
    1 | string = input("input data")
      | ^~~~~~
Language: C++

#include<iostream>
#include<string>

int main(void){

    std::string str;
    std::getline(std::cin,str);
    str.reverse(str.begin(),sr.end());
    std::cout<<str<<std::endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
    8 |     str.reverse(str.begin(),sr.end());
      |         ^~~~~~~
      |         reserve
a.cc:8:29: error: 'sr' was not declared in this scope; did you mean 'str'?
    8 |     str.reverse(str.begin(),sr.end());
      |                             ^~
      |                             str
Language: C++

#include<iostream>
#include<string>

int main(void){

    std::string str;
    std::getline(std::cin,str);
    str.reverse(str.begin(),str.end());
    std::cout<<str<<std::endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
    8 |     str.reverse(str.begin(),str.end());
      |         ^~~~~~~
      |         reserve
Language: C++

#include<iostream>
#include<algorithm>
#include<string>

int main(void){

    std::string str;
    std::getline(std::cin,str);
    str.reverse(str.begin(),str.end());
    std::cout<<str<<std::endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
    9 |     str.reverse(str.begin(),str.end());
      |         ^~~~~~~
      |         reserve
Language: C++

import java.util.*;


public class Main {
	public static void main(String[] args){
	
		Scanner sc = new Scanner(System. in);
		String line = sc.nextLine();
		char[] str = line.toCharArray();
		
		char[] rts = new char[20];
		
		for(int i=0;i<20;i++){
			str[20-i]=rts[i];
		}
		
		for(int i=0;i<20;i++){
		System.out.print(rts[i]);
		}
	}
}




Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
Language: C++

import java.util.*;


public class Main {
	public static void main(String[] args){
	
		Scanner sc = new Scanner(System. in);
		String line = sc.nextLine();
		char[] str = line.toCharArray();
		int n = line.length();
				
		char[] rts = new char[20];
		
		for(int i=0;i<n;i++){
			rts[i]=str[n-i-1];
		}
		
		for(int i=0;i<n;i++){
		System.out.print(rts[i]);
		}
	}
}




Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<iostream>
using namespace std;


int main() {
	
	char c[20];
	int size = 0;

	for (;;) {
		scanf_s("%c", &c[size]);
		if (c[size] == '\n')break;
		size++;
	}

	for (int i = size; i >= 0; i--) {

		printf("%c", c[i]);
	}

	printf("\n");

	//system("pause");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   14 |                 scanf_s("%c", &c[size]);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <stdio.h>
int main(void){
    // Your code here!
    int main(void){
    char str[100];
    int i;
    int count=0;
    
    scanf("%s",str);
    
    for(i=0;str[i]!='\0';i++){
        count++;
    }
    for(i=count-1;i>=0;i--){
        printf("%c",str[i]);
    }
    printf("\n");

    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:4:19: error: a function-definition is not allowed here before '{' token
    4 |     int main(void){
      |                   ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:2:15: note: to match this '{'
    2 | int main(void){
      |               ^
Language: C++

main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}
      |     ^
Language: C++

main(i){char a[21];for(scanf("%s",a),i=strlen(a)+1;i;i--)putchar(a[i-1]);}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(i){char a[21];for(scanf("%s",a),i=strlen(a)+1;i;i--)putchar(a[i-1]);}
      |     ^
Language: C++

#include<stdio,h>
#include<string.h>
int main(){
char a[20];
int l,i;
scanf("%s",a);
l=strlen(a);
for(i=l-1;i>=0;i--)
printf("%c",a[i]);
return 0;
}

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