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

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

int main(){
  string a;
  cin>>a;
  for(int i=0;i<a.size();i++)
      cout<<a[i];
  if(i==3){
  cout<<" "
  }
    }
        cout<<endl;
      

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: 'i' was not declared in this scope
    9 |   if(i==3){
      |      ^
a.cc:10:12: error: expected ';' before '}' token
   10 |   cout<<" "
      |            ^
      |            ;
   11 |   }
      |   ~         
a.cc: At global scope:
a.cc:13:9: error: 'cout' does not name a type
   13 |         cout<<endl;
      |         ^~~~
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

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

int main(){
  string a;
  cin>>a;
  for(i=0;i<a.size();i++)
      cout<<a[i];
  if(i==3){
  cout<<" "
  }
    }
        cout<<endl;
      

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0;i<a.size();i++)
      |       ^
a.cc:9:6: error: 'i' was not declared in this scope
    9 |   if(i==3){
      |      ^
a.cc:10:12: error: expected ';' before '}' token
   10 |   cout<<" "
      |            ^
      |            ;
   11 |   }
      |   ~         
a.cc: At global scope:
a.cc:13:9: error: 'cout' does not name a type
   13 |         cout<<endl;
      |         ^~~~
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

#include <cstdio>
#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;

int main()
{
	string s;
	cin >> s;
	for (int i = 0; i < 12; i++) {
		cout << s.at[i];
		if (i == 3) cout << " ";
	}
	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   15 |                 cout << s.at[i];
      |                             ^
Language: C++

s = gets.chomp
puts (s[0...4] + ' ' + s[4..-1])

Compiler output:
a.cc:2:9: error: too many decimal points in number
    2 | puts (s[0...4] + ' ' + s[4..-1])
      |         ^~~~~
a.cc:2:26: error: too many decimal points in number
    2 | puts (s[0...4] + ' ' + s[4..-1])
      |                          ^~~
a.cc:1:1: error: 's' does not name a type
    1 | s = gets.chomp
      | ^
Language: C++

#include <stdio.h>
int main(void){
char s[25];
  scanf("%s",s);
  for(count=11;count!=4;count--){
  s[count+1]=s[count];
  }
  s[4]=' ';
  printf("%s",s);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'count' was not declared in this scope
    5 |   for(count=11;count!=4;count--){
      |       ^~~~~
Language: C++

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

// gcd(a,b)
int gcd(int a,int b){
	(b == 0) ? gcd(b, a % b) : (return a);
}

// lcm(a,b)
int lcm(int a,int b){
	return (a * b) / gcd(a,b);
}

int main(int argc, char const *argv[])
{
	string str;
	cin >> str;
	for (int i = 0; i < 12; i ++){
		cout << str[i];
		if (i == 3) cout << " ";
	}
	return 0;
}


Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:6:37: error: expected primary-expression before 'return'
    6 |         (b == 0) ? gcd(b, a % b) : (return a);
      |                                     ^~~~~~
a.cc:6:37: error: expected ')' before 'return'
    6 |         (b == 0) ? gcd(b, a % b) : (return a);
      |                                    ~^~~~~~
      |                                     )
a.cc:7:1: warning: no return statement in function returning non-void [-Wreturn-type]
    7 | }
      | ^
Language: C++

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

// gcd(a,b)
int gcd(int a,int b){
	(b == 0) ? (return a) : gcd(b, a % b);
}

// lcm(a,b)
int lcm(int a,int b){
	return (a * b) / gcd(a,b);
}

int main(int argc, char const *argv[])
{
	for (int i = 0; i < 12; i ++){
		cout << s[i];
		if (i == 3) cout << " ";
	}
	return 0;
}


Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:6:21: error: expected primary-expression before 'return'
    6 |         (b == 0) ? (return a) : gcd(b, a % b);
      |                     ^~~~~~
a.cc:6:21: error: expected ')' before 'return'
    6 |         (b == 0) ? (return a) : gcd(b, a % b);
      |                    ~^~~~~~
      |                     )
a.cc:6:46: error: expected ':' before ';' token
    6 |         (b == 0) ? (return a) : gcd(b, a % b);
      |                                              ^
      |                                              :
a.cc:6:46: error: expected primary-expression before ';' token
a.cc:7:1: warning: no return statement in function returning non-void [-Wreturn-type]
    7 | }
      | ^
a.cc: In function 'int main(int, const char**)':
a.cc:17:25: error: 's' was not declared in this scope
   17 |                 cout << s[i];
      |                         ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>

#define _CRT_SECURE_NO_WARNINGS
#define TLong long long 

int main(int argc, char const *argv[])
{
	char str[17];
	scanf("%s",str);
	for (int i = 0; i < strlen(s) + 1; ++i)
	{
		if(i < 4)	printf("%c", str[i]);
		else if(i == 4)	puts(" ");
		else printf("%c", str[i - 1]);
		return 0;
	}
}


Compiler output:
main.c: In function 'main':
main.c:14:36: error: 's' undeclared (first use in this function)
   14 |         for (int i = 0; i < strlen(s) + 1; ++i)
      |                                    ^
main.c:14:36: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;cin>>s;
  cout<<s.substr(s.begin(),4)<<" "<<s.substr(s.begin()+4,8)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:25: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
    5 |   cout<<s.substr(s.begin(),4)<<" "<<s.substr(s.begin()+4,8)<<endl;
      |                  ~~~~~~~^~
      |                         |
      |                         std::__cxx11::basic_string<char>::iterator
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3208:24: note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |              ~~~~~~~~~~^~~~~~~~~
a.cc:5:55: error: cannot convert '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
    5 |   cout<<s.substr(s.begin(),4)<<" "<<s.substr(s.begin()+4,8)<<endl;
      |                                              ~~~~~~~~~^~
      |                                                       |
      |                                                       __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >
/usr/include/c++/14/bits/basic_string.h:3208:24: note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |              ~~~~~~~~~~^~~~~~~~~
Language: C++

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

int main() {
	string S;
	cin>>S;
	rep(i,S.size()){
		if(i==4)cout<<' ';
		cout<<S[i];
	}
	cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'i' was not declared in this scope
    7 |         rep(i,S.size()){
      |             ^
a.cc:7:9: error: 'rep' was not declared in this scope
    7 |         rep(i,S.size()){
      |         ^~~
Language: C++

#include<algorithm>
#include<iostream>
#include<functional>
#include<cmath>
#include<iomanip>
using namespace std;
int main(){
  char s[16];
  for(int i=0;i<12;i++){
    cin>>s[i];
    char a=s[i]
    cout<<a;
    if(i==3)
      cout<<" ";
  }
  cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected ',' or ';' before 'cout'
   12 |     cout<<a;
      |     ^~~~
Language: C++

import java.util.*;

 
class Main {
 
    private static Scanner sc = new Scanner(System.in);
 
    public static void main(String[] args) {
        String s = sc.next();
        char[] c = s.toCharArray();
        String s2="";
        for(int i=0;i<4;i++) {
            s2+=c[i];
        }
        s2+=" ";
        for(int i=4;i<c.length;i++){
        	s2+=c[i];
        }
        //String s = String.valueOf(i);
        //int i = Integer.parseInt(s);
        System.out.println(s2);

    }
}



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:6:12: error: expected ':' before 'static'
    6 |     private static Scanner sc = new Scanner(System.in);
      |            ^~~~~~~
      |            :
a.cc:6:20: error: 'Scanner' does not name a type
    6 |     private static Scanner sc = new Scanner(System.in);
      |                    ^~~~~~~
a.cc:8:11: error: expected ':' before 'static'
    8 |     public static void main(String[] args) {
      |           ^~~~~~~
      |           :
a.cc:8:29: error: 'String' has not been declared
    8 |     public static void main(String[] args) {
      |                             ^~~~~~
a.cc:8:38: error: expected ',' or '...' before 'args'
    8 |     public static void main(String[] args) {
      |                                      ^~~~
a.cc:24:2: error: expected ';' after class definition
   24 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:9:9: error: 'String' was not declared in this scope
    9 |         String s = sc.next();
      |         ^~~~~~
a.cc:10:13: error: structured binding declaration cannot have type 'char'
   10 |         char[] c = s.toCharArray();
      |             ^~
a.cc:10:13: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:10:13: error: empty structured binding declaration
a.cc:10:16: error: expected initializer before 'c'
   10 |         char[] c = s.toCharArray();
      |                ^
a.cc:11:16: error: expected ';' before 's2'
   11 |         String s2="";
      |                ^~
a.cc:13:13: error: 's2' was not declared in this scope
   13 |             s2+=c[i];
      |             ^~
a.cc:13:17: error: 'c' was not declared in this scope
   13 |             s2+=c[i];
      |                 ^
a.cc:15:9: error: 's2' was not declared in this scope
   15 |         s2+=" ";
      |         ^~
a.cc:16:23: error: 'c' was not declared in this scope
   16 |         for(int i=4;i<c.length;i++){
      |                       ^
a.cc:21:9: error: 'System' was not declared in this scope
   21 |         System.out.println(s2);
      |         ^~~~~~
Language: C

#include <stdio.h>

int main()
{
    int i;
   char a[12];
   scanf("%s,a);
    for(i=0;i<=3;i++)
   {
       printf("%c",a[i]);
   }
   printf(" ");
   for(i=4;i<strlen(a);i++)
   {
       printf("%c",a[i]);
   }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:10: warning: missing terminating " character
    7 |    scanf("%s,a);
      |          ^
main.c:7:10: error: missing terminating " character
    7 |    scanf("%s,a);
      |          ^~~~~~~
main.c:8:5: error: expected expression before 'for'
    8 |     for(i=0;i<=3;i++)
      |     ^~~
main.c:17:14: error: expected ';' before '}' token
   17 |     return 0;
      |              ^
      |              ;
   18 | }
      | ~
Language: C++

,.,.,.,.>++++[>++++++++<-]>.,.,.,.,.,.,.,.,.>++++[>++++++++<-]>.

Compiler output:
a.cc:1:1: error: expected unqualified-id before ',' token
    1 | ,.,.,.,.>++++[>++++++++<-]>.,.,.,.,.,.,.,.,.>++++[>++++++++<-]>.
      | ^
a.cc:1:2: error: expected unqualified-id before '.' token
    1 | ,.,.,.,.>++++[>++++++++<-]>.,.,.,.,.,.,.,.,.>++++[>++++++++<-]>.
      |  ^
Language: C++

,.,.,.,.>++++[>++++++++<-]<....,.,.,.,.,.,.,.,.

Compiler output:
a.cc:1:1: error: expected unqualified-id before ',' token
    1 | ,.,.,.,.>++++[>++++++++<-]<....,.,.,.,.,.,.,.,.
      | ^
a.cc:1:2: error: expected unqualified-id before '.' token
    1 | ,.,.,.,.>++++[>++++++++<-]<....,.,.,.,.,.,.,.,.
      |  ^
Language: C++

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

int main(){
  string s;
  cin>>s;
  for(int i=0;i<=s.size();i++){
    if(i==4){
      cout<<" ";
      continue;
    }
    if(i<=3){
    cout<<s[i];
    }else{
      cout<<s[ii1];
    }
  }
    cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'ii1' was not declared in this scope
   15 |       cout<<s[ii1];
      |               ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    cin>>s;
    for(i=0;i<=3;i++)
        cout<<s[i];
    cout<<' ';
    for(i=4;i<s.size();i++)
    cout<<s[i];
    cout<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'i' was not declared in this scope
    6 |     for(i=0;i<=3;i++)
      |         ^
a.cc:9:9: error: 'i' was not declared in this scope
    9 |     for(i=4;i<s.size();i++)
      |         ^
Language: C++

#include<iostream>
using namespace std;
string s;
int main()
{
    cin>>s；
    cout<<s[0]<<s[1]<<s[2]<<s[3]<<" "<<s[4]<<s[5]<<s[6]<<s[7]<<s[8]<<s[9]<<s[10]<<s[11];
    return 0; 
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 's\U0000ff1b' was not declared in this scope
    6 |     cin>>s；
      |          ^~~
Language: C++

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

int main(){
  string s;
  cin >> s;
  s = s.Insert(4," ");
  cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'Insert'; did you mean 'insert'?
    7 |   s = s.Insert(4," ");
      |         ^~~~~~
      |         insert
Language: C++

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

int main(){
  string s;
  cin >> s;
  cout << s.Insert(4," ") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'Insert'; did you mean 'insert'?
    7 |   cout << s.Insert(4," ") << endl;
      |             ^~~~~~
      |             insert
Language: C++

,.,.,.,.>++++++++++++++++++++++++++++++++.,.,.,.,.,.,.,.,.

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

 #include<iostream>
#include<algorithm>
#include<math.h>
#include<cstdio>
#include<ctype.h>
#include<stdio.h>
#include<set>
#include<vector>
#include<map>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<numeric>
#include<string>
using namespace std;
typedef long long ll;
ll dx[] = { 1,1,0,-1,-1,-1,0,1 };
ll dy[] = { 0,1,1,1,0,-1,-1,-1 };
ll prime(ll x) {
	ll i;
	if (x < 2)return 0;
	else if (x == 2) return 1;
	if (x % 2 == 0) return 0;
	for (i = 3; i*i <= x; i += 2) {
		if (x%i == 0) return 0;
	}
	return 1;
}
ll gcd(ll a, ll b) {
	if (a<b) { return gcd(b, a); }
	else if (a%b) { return gcd(b, a%b); }
	else { return b; }
}

ll MOD = 1000000007;
int main() {
	string S;
  	cin>>S;
  	cout<<S.substr(0,3)<<" "<<substr(4,11)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:35: error: 'substr' was not declared in this scope
   41 |         cout<<S.substr(0,3)<<" "<<substr(4,11)<<endl;
      |                                   ^~~~~~
Language: C++

s = input();
ans = s[0:4]
ans += " "
ans += (s[4::])
print(ans)

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input();
      | ^
a.cc:2:1: error: 'ans' does not name a type
    2 | ans = s[0:4]
      | ^~~
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <cmath>
#include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, imag()2.3
using namespace std;
 
#define MOD 1000000007
#define ll long long
#define ld long double
#define FOR(i,a,b) for(ll i=(ll)a;i<(ll)b;i++)
#define rep(i,n) FOR(i,0,n)
#define pb push_back
#define mp make_pair
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rmsame(a) sort(all(a)),a.erase(unique(all(a)), a.end())
#define rmvector(a,b) rep(i,a.size())rep(j,b.size())if(a[i]==b[j]){a.erase(a.begin()+i);i--;break;}
template<typename X> bool exist(vector<X> vec, X item){return find(all(vec), item)!=vec.end();}
template<class T = ll> T in(){T x; cin >> x; return (x);}
 
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
 
 string s = <string>in();
rep(i,s.size()){
cout << s[i];
if(i==3) cout << " " ;
}
cout << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:13: error: expected primary-expression before '<' token
   30 |  string s = <string>in();
      |             ^
a.cc:30:20: error: expected primary-expression before '>' token
   30 |  string s = <string>in();
      |                    ^
Language: Java

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

        for (int i = 0; i < 12; i++) {
            System.out.print(before.charAt(i));
            if (i == 3) {
                System.out.print(' ');
            }
        }
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C

#include <stdio.h>

String main(String *lst){
 String lst_[15];
 int i;
 for(i =0; i++; i<4){
   lst_[i] = lst[i];
   }
   
 lst_[4] = " ";
 
 for(i =5; i++; i<12){
   lst_[i] = lst[i];
   }
 lst_[12] = "¥n";
 
 return *lst_;
}

Compiler output:
main.c:3:1: error: unknown type name 'String'
    3 | String main(String *lst){
      | ^~~~~~
main.c:3:13: error: unknown type name 'String'
    3 | String main(String *lst){
      |             ^~~~~~
Language: C

#include <stdio.h>

String main(String *lst){
 String lst_[15];
 int i;
 for(i =0; i++; i<4){
   lst_[i] = lst[i];
   }
   
 lst_[4] = " ";
 
 for(i =5; i++; i<12){
   lst_[i] = lst[i];
   }
 lst_[12] = "¥n";
 
 return *lst_;

Compiler output:
main.c:3:1: error: unknown type name 'String'
    3 | String main(String *lst){
      | ^~~~~~
main.c:3:13: error: unknown type name 'String'
    3 | String main(String *lst){
      |             ^~~~~~
Language: C++

#include "IntMod.h"
typedef IntMod<1000000007> MInt;

//#include "Union_Find.h"

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#include <list>
#include <utility>
#include <algorithm>
#include <functional>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <iomanip>
#include <sstream>
#include <numeric>
#include <array>
#include <bitset>

using namespace std;
#define REP(i,a,n) for(int i = (a); i < (int)(n); ++i)
#define REPM(i,n,a) for(int i = ((n) - 1); i >= (a); --i)
#define EPS 0.0001
#define INF 0x3FFFFFFF
#define INFLL 0x3FFFFFFF3FFFFFFF
#define INFD 1.0e+308
#define FLOAT setprecision(16)
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<LL, LL> PP;

template <class T, class U>
istream& operator>>(istream& ist, pair<T, U>& right) { return ist >> right.first >> right.second; }
template <class T, class U>
ostream& operator<<(ostream& ost, pair<T, U>& right) { return ost << right.first << ' ' << right.second; }
template <class T, class TCompatible, size_t N>
void Fill(T(&dest)[N], const TCompatible& val) { fill(begin(dest), end(dest), val); }
template <class T, class TCompatible, size_t M, size_t N>
void Fill(T(&dest)[M][N], const TCompatible& val) { for (int i = 0; i < M; ++i) Fill(dest[i], val); }
// all_of

#if 1
#include <unordered_set>
#include <unordered_map>
template<typename T>
using PriorityQ = priority_queue<T, vector<T>, greater<T> >;	// コスト小を優先
#endif

string s;
int main() {
	cin >> s;
	s.insert(s.begin() + 4, ' ');
	cout << s << endl;
	return 0;
}



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

    #include <iostream>
    int main(){
    for(int i = 0; i < 12; i++){
    char c;
    cin >> c;
    cout << c;
    if(i == 3){
    cout << " ";
    }
    }
    cout << endl;
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin >> c;
      |     ^~~
      |     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:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     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:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     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:11:13: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |     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>
int mains(){
for(int i = 0; i < 12; i++){
char c;
cin >> c;
cout << c;
if(i == 3){
cout << " ";
}
}
cout << endl;
return 0;
}


Compiler output:
a.cc: In function 'int mains()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 | cin >> c;
      | ^~~
      | 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:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 | 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:11:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 | 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:11:9: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 | 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 namespace std;

int main(){
	int a[4],b[8];
	cin >> a[4] >>b[8];
	cout << a[4] <<" " << b[8];
return0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: 'return0' was not declared in this scope
    8 | return0;
      | ^~~~~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// get a integer
		int a = sc.nextInt();
                int[] arr = new int[a];
                for (int i = 0; i < a; i++) {
                     arr[i] = sc.nextInt();
                }
                int count = 0;
                if (arr[arr[i]] == i) {
                     count++;
                }
		System.out.println(count / 2);
	}
}

Compiler output:
Main.java:12: error: cannot find symbol
                if (arr[arr[i]] == i) {
                            ^
  symbol:   variable i
  location: class Main
Main.java:12: error: cannot find symbol
                if (arr[arr[i]] == i) {
                                   ^
  symbol:   variable i
  location: class Main
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// get a integer
		int a = sc.nextInt();
                int[] arr = new int[a];
                for (int i = 0; i < a; i++) {
                     a[i] = sc.nextInt();
                }
                int count = 0;
                if (a[a[i]] == i) {
                     count++;
                }
		System.out.println(count / 2);
	}
}

Compiler output:
Main.java:9: error: array required, but int found
                     a[i] = sc.nextInt();
                      ^
Main.java:12: error: cannot find symbol
                if (a[a[i]] == i) {
                        ^
  symbol:   variable i
  location: class Main
Main.java:12: error: array required, but int found
                if (a[a[i]] == i) {
                       ^
Main.java:12: error: array required, but int found
                if (a[a[i]] == i) {
                     ^
Main.java:12: error: cannot find symbol
                if (a[a[i]] == i) {
                               ^
  symbol:   variable i
  location: class Main
5 errors
Language: C++

#include<iostream>
using namespace std;
 
int main()
{
  string s;
  cin >> s
  cout << s.substr(0,4) << ' ' << s.substr(4, 8); 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected ';' before 'cout'
    7 |   cin >> s
      |           ^
      |           ;
    8 |   cout << s.substr(0,4) << ' ' << s.substr(4, 8);
      |   ~~~~
Language: Java

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s=sc.next();
        s=s.substring(0,4)+" "+s.substring(4,12);
        System.out.println(s);
   }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

string s;
cin >> s;
cout << s.substr(0, 4) + " " + s.substr(4);


Compiler output:
a.cc:1:1: error: 'string' does not name a type
    1 | string s;
      | ^~~~~~
a.cc:2:1: error: 'cin' does not name a type
    2 | cin >> s;
      | ^~~
a.cc:3:1: error: 'cout' does not name a type
    3 | cout << s.substr(0, 4) + " " + s.substr(4);
      | ^~~~
Language: C++

#include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char *argv[]){
	cout << taskA(string(argv[0]));
}
string taskA(string s) {
	return s.substr(0, 4) + " " + s.substr(4);
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:6:17: error: 'taskA' was not declared in this scope
    6 |         cout << taskA(string(argv[0]));
      |                 ^~~~~
Language: C

int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);}

Compiler output:
main.c: In function 'main':
main.c:1:26: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    1 | int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);}
      |                          ^~~~
main.c:1:41: error: unknown type name 'size_t'
    1 | int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);}
      |                                         ^~~~~~
main.c:1:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
  +++ |+#include <stddef.h>
    1 | int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);}
main.c:1:97: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
    1 | int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);}
      |                                                                                                 ^~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts'
  +++ |+#include <stdio.h>
    1 | int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);}
Language: C++

int main() {
	string a;
	cin >> a;
	rep(i, 4)
	cout << a[i];
	cout << " ";
	rep(i, 8)
		cout << a[i + 4];
	cout << endl;




}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:9: error: 'string' was not declared in this scope
    2 |         string a;
      |         ^~~~~~
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> a;
      |         ^~~
a.cc:3:16: error: 'a' was not declared in this scope
    3 |         cin >> a;
      |                ^
a.cc:4:13: error: 'i' was not declared in this scope
    4 |         rep(i, 4)
      |             ^
a.cc:4:9: error: 'rep' was not declared in this scope
    4 |         rep(i, 4)
      |         ^~~
a.cc:6:9: error: 'cout' was not declared in this scope
    6 |         cout << " ";
      |         ^~~~
a.cc:9:17: error: 'endl' was not declared in this scope
    9 |         cout << endl;
      |                 ^~~~
Language: C++

#include <bits/stdc++.h>

int main()
{string s;
 cin>>s;
cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:2: error: 'string' was not declared in this scope
    4 | {string s;
      |  ^~~~~~
a.cc:4:2: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |  cin>>s;
      |  ^~~
      |  std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:7: error: 's' was not declared in this scope
    5 |  cin>>s;
      |       ^
a.cc:6:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 | cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<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:6:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 | cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<endl;
      |                                          ^~~~
      |                                          std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>

int main()
{ string s;
cin>> s;
cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 | { string s;
      |   ^~~~~~
a.cc:4:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 | cin>> s;
      | ^~~
      | std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:7: error: 's' was not declared in this scope
    5 | cin>> s;
      |       ^
a.cc:6:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 | cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<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:6:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 | cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<endl;
      |                                          ^~~~
      |                                          std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++


int main(){
    char *str = new char[10001];
    int count;
    scanf("%s", str);
    scanf("%d", &count);
    
    size_t str_len = strlen(str);
    

    int idx = 0;
    while(count > 0){
        
        
        int sub_a = static_cast<int>(str[idx]) - 97;
        int next2a = 123 - static_cast<int>(str[idx]);
        
        
        
        if(idx == str_len - 1){
            str[idx] = 97 + (sub_a + count) % 26;
            count = 0;
        }
        else if(sub_a % 26 != 0 && next2a <= count){
            str[idx] = 'a';
            count -= next2a;
            idx ++;
            
        }
        else
            idx++;
    
    }

    printf("%s\n", str);
    delete[] str;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'scanf' was not declared in this scope
    5 |     scanf("%s", str);
      |     ^~~~~
a.cc:8:5: error: 'size_t' was not declared in this scope
    8 |     size_t str_len = strlen(str);
      |     ^~~~~~
a.cc:1:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | 
a.cc:20:19: error: 'str_len' was not declared in this scope
   20 |         if(idx == str_len - 1){
      |                   ^~~~~~~
a.cc:35:5: error: 'printf' was not declared in this scope
   35 |     printf("%s\n", str);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 |
Language: C++


#include <iostream>
#include <string>

using namespace std;

int main(){
    char *str = new char[10000];
    int count;
    scanf("%s", str);
    scanf("%d", &count);
    
    size_t str_len = strlen(str);
    int idx = 0;
    while(count > 0){
        
        
        int sub_a = static_cast<int>(str[idx] - 97);
        int next2a = static_cast<int>(123 - str[idx]);
      
        
        if(sub_a % 26 != 0 && next2a < count){
            str[idx] = 'a';
            count -= next2a;
            idx ++;
            
        }
        else if(idx == str_len - 1){
            str[idx] = 97 + (sub_a + count) % 26;
            count = 0;
        }
        else
            idx++;
    
    }

    printf("%s", str);
    delete[] str;
    return 0;
}

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

include <stdio.h>


int main(){
    // get size
    int number;
    scanf("%d", &number);
    
    int *likes = new int[number];
    
    for(int i = 0; i < number; i++){
        scanf("%d", &likes[i]);
    }
    
    int pairs = 0;
    for(int i = 0; i < number; i++){
        int r1 = i+1;
        int r1_likes = likes[i];
        int r2_likes = likes[r1_likes-1];
        
        if(r1 == r2_likes){
            pairs++;
        }
    }
    printf("%d\n", pairs);
    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
Language: C++

#include <stdioi.h>


int main(){
    // get size
    int number;
    scanf("%d", &number);
    
    int *likes = new int[number];
    
    for(int i = 0; i < number; i++){
        scanf("%d", &likes[i]);
    }
    
    int pairs = 0;
    for(int i = 0; i < number; i++){
        int r1 = i+1;
        int r1_likes = likes[i];
        int r2_likes = likes[r1_likes-1];
        
        if(r1 == r2_likes){
            pairs++;
        }
    }
    printf("%d", pairs);
    return 0;
}

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

#include<iostream>
using namespace std;
ios::sync_with_stdio(false);
int main(void){
	string s;
	cin >> s;
	cout << s.substr(0,4) << " " << s.substr(4,8) << endl;
	return 0;
}

Compiler output:
a.cc:3:1: error: specializing member 'std::basic_ios<char>::sync_with_stdio' requires 'template<>' syntax
    3 | ios::sync_with_stdio(false);
      | ^~~
Language: C++


#include <iostream>
#include <cstdio>
#define rep(i, n) fr(i, 0, n)
int main() {
    string s;
    cin >>s;
    rep(i, 4)cout<<s[i];
    cout<<" ";
    rep(i, 8)cout<<s[i+4];
    cout<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'string' was not declared in this scope
    6 |     string s;
      |     ^~~~~~
a.cc:6:5: 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:2:
/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:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |     cin >>s;
      |     ^~~
      |     std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:11: error: 's' was not declared in this scope
    7 |     cin >>s;
      |           ^
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     rep(i, 4)cout<<s[i];
      |         ^
a.cc:4:22: note: in definition of macro 'rep'
    4 | #define rep(i, n) fr(i, 0, n)
      |                      ^
a.cc:4:19: error: 'fr' was not declared in this scope
    4 | #define rep(i, n) fr(i, 0, n)
      |                   ^~
a.cc:8:5: note: in expansion of macro 'rep'
    8 |     rep(i, 4)cout<<s[i];
      |     ^~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<" ";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:11: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |     cout<<endl;
      |           ^~~~
      |           std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++


#include<iostream>
using namespace std;
int main
{
string S;
cin>>S;
for(int i=0;i<12;i++)
{
if (i==4) cout<<' ';
cout<<S[i];
}
return 0;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main
      |     ^~~~
a.cc:6:8: error: expected primary-expression before 'S'
    6 | string S;
      |        ^
a.cc:6:8: error: expected '}' before 'S'
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
a.cc:7:1: error: 'cin' does not name a type
    7 | cin>>S;
      | ^~~
a.cc:8:1: error: expected unqualified-id before 'for'
    8 | for(int i=0;i<12;i++)
      | ^~~
a.cc:8:13: error: 'i' does not name a type
    8 | for(int i=0;i<12;i++)
      |             ^
a.cc:8:18: error: 'i' does not name a type
    8 | for(int i=0;i<12;i++)
      |                  ^
a.cc:13:1: error: expected unqualified-id before 'return'
   13 | return 0;
      | ^~~~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++


#include<iostream>
#include<string.h>
using namespace std;
int main
{
char S[13];
cin.getline(S,12);
for(int i=12;i>=4;i--)
{
S[i]=S[i-1];
}
S[4]=' ';
cout<<S;
return 0;
}

Compiler output:
a.cc:5:5: error: cannot declare '::main' to be a global variable
    5 | int main
      |     ^~~~
a.cc:7:1: error: expected primary-expression before 'char'
    7 | char S[13];
      | ^~~~
a.cc:7:1: error: expected '}' before 'char'
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
a.cc:8:1: error: 'cin' does not name a type
    8 | cin.getline(S,12);
      | ^~~
a.cc:9:1: error: expected unqualified-id before 'for'
    9 | for(int i=12;i>=4;i--)
      | ^~~
a.cc:9:14: error: 'i' does not name a type
    9 | for(int i=12;i>=4;i--)
      |              ^
a.cc:9:19: error: 'i' does not name a type
    9 | for(int i=12;i>=4;i--)
      |                   ^
a.cc:13:1: error: 'S' does not name a type
   13 | S[4]=' ';
      | ^
a.cc:14:1: error: 'cout' does not name a type
   14 | cout<<S;
      | ^~~~
a.cc:15:1: error: expected unqualified-id before 'return'
   15 | return 0;
      | ^~~~~~
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++


#include<iostream>
#include<string.h>
using namespace std;
int main
{
char str[51];
cin.getline(str,49);
for(int i=50;i>=4;i--)
{
str[i]=str[i-1];
}
str[4]=' ';
}

Compiler output:
a.cc:5:5: error: cannot declare '::main' to be a global variable
    5 | int main
      |     ^~~~
a.cc:7:1: error: expected primary-expression before 'char'
    7 | char str[51];
      | ^~~~
a.cc:7:1: error: expected '}' before 'char'
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
a.cc:8:1: error: 'cin' does not name a type
    8 | cin.getline(str,49);
      | ^~~
a.cc:9:1: error: expected unqualified-id before 'for'
    9 | for(int i=50;i>=4;i--)
      | ^~~
a.cc:9:14: error: 'i' does not name a type
    9 | for(int i=50;i>=4;i--)
      |              ^
a.cc:9:19: error: 'i' does not name a type
    9 | for(int i=50;i>=4;i--)
      |                   ^
a.cc:13:1: error: 'str' does not name a type
   13 | str[4]=' ';
      | ^~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include<iostream>
#include<string.h>
using namespace std;
int main
{
char srt[51];
cin.getline(str,49);
for(int i=50;i>=4;i--)
{
str[i]=str[i-1];
}
str[4]=' ';
}


Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main
      |     ^~~~
a.cc:6:1: error: expected primary-expression before 'char'
    6 | char srt[51];
      | ^~~~
a.cc:6:1: error: expected '}' before 'char'
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
a.cc:7:1: error: 'cin' does not name a type
    7 | cin.getline(str,49);
      | ^~~
a.cc:8:1: error: expected unqualified-id before 'for'
    8 | for(int i=50;i>=4;i--)
      | ^~~
a.cc:8:14: error: 'i' does not name a type
    8 | for(int i=50;i>=4;i--)
      |              ^
a.cc:8:19: error: 'i' does not name a type
    8 | for(int i=50;i>=4;i--)
      |                   ^
a.cc:12:1: error: 'str' does not name a type
   12 | str[4]=' ';
      | ^~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

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

int main(){
	string words;
	cin >> string;
	for (int i = 0; i < 12; ++i)
	{
		cout << string[i];
		if (i == 3)
		{
			cout << " "; 
		}
	}
	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: expected primary-expression before ';' token
    7 |         cin >> string;
      |                      ^
a.cc:10:31: error: expected primary-expression before '[' token
   10 |                 cout << string[i];
      |                               ^
Language: C++

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

int main(){
	string words;
	cin >> string;
	for (int i = 0; i < 12; ++i)
	{
		cout << string[i]
		if (i == 3)
		{
			cout << " " ;
		}
	}
	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: expected primary-expression before ';' token
    7 |         cin >> string;
      |                      ^
a.cc:10:31: error: expected primary-expression before '[' token
   10 |                 cout << string[i]
      |                               ^
Language: C

#inlcude<stdio.h>
int main()
{
	char s[13],s1[13];
	scanf("%4s%8s",s,s1);
	printf("%s %s\n",s,s1);
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude<stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |         scanf("%4s%8s",s,s1);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inlcude<stdio.h>
main.c:5:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |         scanf("%4s%8s",s,s1);
      |         ^~~~~
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |         printf("%s %s\n",s,s1);
      |         ^~~~~~
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'printf'