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

#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
                
#define speedio ios_base::sync_with_stdio(false); cin.tie(NULL);
#define pretime float(clock()-clk)/CLOCKS_PER_SEC
#define max2(a,b) ((a)>(b) ? (a) : (b))   
#define min2(a,b) ((a)<(b) ? (a) : (b)) 
#define rep(i,a,b) for(i=a;i<=b;++i)
#define rev(i,a,b) for(i=a;i>=b;--i) 
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
#define lli long long int 
#define ins insert
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define PI 3.14159265
#define mod 1000000007
#define inf 1000000000000000

using namespace std;
typedef vector<lli>   vll;
typedef vector<int>   vi;
typedef set<lli>      sll;
typedef set<int>      si;
typedef pair<lli,lli> pll;
typedef pair<int,int> pii;
clock_t clk=clock();       

lli i,j;
void solve(void);

int main()
{
  speedio;
   int t=1;  
  // cin>>t;
   while(t--)
     solve();

  return 0;
}
//
void solve()
{
  lli q; cin>>q;
  multiset<lli> s;
lli sum=0; lli prev=0;
  rep(i,1,q)
  {
  	int x; cin>>x;
  	if(x==1)
  	{
  		lli a,b; cin>>a>>b;
  		s.ins(a); sum+=a; prev=prev+b;
  	}
    else if(x==2)
    {
    	auto it=s.begin();
    	if(sz(s)==1) cout<<*it<<" "<<prev<<"\n";
    	else if(sz(s)==2)
    	  cout<<*it<<" "<<sum-2*(*it)+prev<<"\n";
    	else
    	{
    	  it=s.begin(); 
    	  lli val1=sum-2*(*it);
    	  ++it;
    	  val1-=(sz(s)-2)*(*it);
    	  lli idx1=*it;

    	  it=s.end();
    	  --it;
    	  
    	 lli val2=2*(*it)-sum;
    	 --it;
    	 val2+=(sz(s)-2)*(*it);
    	 idx2=*it;

    	 if(val1<val2) cout<<idx1<<" "<<val1+prev<<"\n";
    	 else if(val2<val1) cout<<idx2<<" "<<val2+prev<<"\n";
    	 if(idx1<idx2) cout<<idx1<<" "<<val1+prev<<"\n";
    	 if(idx2<idx1) cout<<idx2<<" "<<val2+prev<<"\n";
    	}
    }
  }	
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:78:10: error: 'idx2' was not declared in this scope; did you mean 'idx1'?
   78 |          idx2=*it;
      |          ^~~~
      |          idx1
Language: C++

#include <iostream>
#include <cstring>
#include <stdlib.h>
#include <vector>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <math.h>
#include <string>
#include <map>
#include <cstdlib>
using namespace std;

typedef long long ll;

int main()
{
    int Q;
    cin >> Q;
    vector<pair<int, int> > ans(n);
    vector<int> a;
    int cnt=0;
    ll fx=0;
    ll sum=0;
    for(int q=0; q<Q; q++){
        int tmp;
        cin >> tmp;
        if(tmp==1){
            int t1, t2;
            cin >> t1 >> t2;
            a.push_back(t1);
            sum+=t1;
            fx+=t2;
        }else{
            if(a.size()==0){
                ans[cnt]=make_pair(0, fx);
            }else if(a.size()==1){
                ans[cnt]=make_pair(a[0], 0);
            }
            else{
                double avg=sum/a.size();
                int mean=int(avg);
                if(avg-int(avg)>0.5) mean+=1;
                ll all=0;
                for(int i=0; i<a.size(); i++){
                    all+=abs(a[i]-mean);
                }
                ans[cnt]=make_pair(mean, all+fx);
            }
            cnt++;
        }
    }
    for(int q=0; q<cnt; q++){
        cout << ans[q].first << ' ' << ans[q].second << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:33: error: 'n' was not declared in this scope
   21 |     vector<pair<int, int> > ans(n);
      |                                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
int median(std::vector<int>& c)
{
    size_t n = c.size() / 2;
    std::nth_element(c.begin(), c.begin() + n, c.end());
    return c[n];
}

vector<int>v;
signed main(){
	int sum=0;
	cin.tie(0);
	ios::sync_with_stdio(false);
	int q,Q;
	cin>>q;
	while(q--){
		cin>>Q;
		if(Q==1){
			int a,b;
			cin>>a>>b;
			sum+=b;
			v.push_back(a);
		}
		else{
			int x=median(v);
			for(int i:v)ret+=abs(v[x]-i);
			cout<<v[x]<<" "<<ret+sum<<endl;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:37: error: 'ret' was not declared in this scope; did you mean 'rep'?
   29 |                         for(int i:v)ret+=abs(v[x]-i);
      |                                     ^~~
      |                                     rep
a.cc:30:42: error: 'ret' was not declared in this scope; did you mean 'rep'?
   30 |                         cout<<v[x]<<" "<<ret+sum<<endl;
      |                                          ^~~
      |                                          rep
Language: C++

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

int main(){
    int q;
    cin >> q;
    vector<ll> v;
    ll b = 0;
    for(int i=0; i<q; i++){
        int Q; cin >> Q;
        if(Q == 1){
            ll A, B;
            cin >> A >> B;
            v.push_back(A);
            val.push_back(A);
            b += B;
        }
        else {
            auto med = v.begin();
            advance(med, v.size() / 2);
            ll x = v[*med];
            ll ans = b - val.sum()
            for(int j=0; j<v.size(); j++) ans += abs(v[j] - x);
            
            cout << x << " " << ans << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'val' was not declared in this scope
   16 |             val.push_back(A);
      |             ^~~
a.cc:23:26: error: 'val' was not declared in this scope
   23 |             ll ans = b - val.sum()
      |                          ^~~
a.cc:24:26: error: 'j' was not declared in this scope
   24 |             for(int j=0; j<v.size(); j++) ans += abs(v[j] - x);
      |                          ^
Language: C++

#include <algorithm>
#include <iostream>
#include <vector>
#include <array>
#include <string>
#include <cmath>
#include <iomanip>
#include <set>
using namespace std;

int main()
{
	int q, a, b, k;
	cin >> q;

	vector<int> als;
	vector<vector<int>> adist;
	unsigned adsize = 0;
	long long atotal, btotal = 0;
	int query;
	int resMinx;
	long long resNum;
	for (int i = 0; i < q; ++i) {
		cin >> query;
		if (query == 1) {
			cin >> a >> b;
			als.push_back(a);
			++adsize;
			adist.emplace_back(vector<int>(adsize));
			for (int j = 0; j < adist.back().size(); ++j) {
				adist.back()[j] = abs(a - als[j]);
			}
			btotal += b;
		}
		else {
			resMinx = 0;
			resNum = LLONG_MAX;
			for (int j = 0; j < adsize; ++j) {
				atotal = 0;
				for (k = 0; k < j; ++k)atotal += adist[j][k];
				for (; k < adsize; ++k)atotal += adist[k][j];
				atotal += btotal;
				if (atotal < resNum) {
					resMinx = j;
					resNum = atotal;
				}
				if (atotal == resNum) {
					if(als[resMinx] > als[j])resMinx = j;
				}
			}
			cout << als[resMinx] << " " << resNum << endl;
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:34: error: 'LLONG_MAX' was not declared in this scope
   37 |                         resNum = LLONG_MAX;
      |                                  ^~~~~~~~~
a.cc:9:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    8 | #include <set>
  +++ |+#include <climits>
    9 | using namespace std;
Language: C++

#include<bits/stdc++.h> 
using namespace std; 
int main() {
	int n;
	cin>>n;
	int arr[n];
	priority_queue<int> s; 
	priority_queue<int,vector<int>,greater<int> > g; 
	int med = arr[0]; 
	s.push(arr[0]); 
	cout << med << endl; 
	for (int i=1; i < n; i++) {
		int z;
		cin>>z;
		int x;
		if(z==1){
			cin>>arr[i]>>x;
		sum+=x;
		
		double x = arr[i]; 
		if (s.size() > g.size()) 
		{ 
			if (x < med) 
			{ 
				g.push(s.top()); 
				s.pop(); 
				s.push(x); 
			} 
			else
				g.push(x); 

			med = (s.top() + g.top())/2.0; 
		} 
		else if (s.size()==g.size()) 
		{ 
			if (x < med) 
			{ 
				s.push(x); 
				med = (double)s.top(); 
			} 
			else
			{ 
				g.push(x); 
				med = (double)g.top(); 
			} 
		} 
		else
		{ 
			if (x > med) 
			{ 
				s.push(g.top()); 
				g.pop(); 
				g.push(x); 
			} 
			else
				s.push(x); 

			
		} 
}
else{
	med = (s.top() + g.top())/2.0; 
	cout<<med+sum<<'\n';
}
		
	} 
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: 'sum' was not declared in this scope
   18 |                 sum+=x;
      |                 ^~~
a.cc:63:19: error: 'sum' was not declared in this scope
   63 |         cout<<med+sum<<'\n';
      |                   ^~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <queue>

using namespace std;

int main(int argc, char *argv[]) {
  int64_t Q;
  cin >> Q;
  int64_t c = 0;
  vector<int64_t> ps;
  for(int i = 0; i < Q; i++){
    int q;
    cin >> q;
    if(q == 1) {
      int64_t a, b;
      cin >> a >> b;
      ps.push_back(a);
      c += b;
      continue;
    }
    if(q == 2) {
      int64_t piv_idx = (ps.size() - 1) / 2;
      std::sort(ps.begin(), ps.end());
      int64_t piv = ps[piv_idx];
      int64_t sum = 0;
      for(int64_t &v : ps){
        sum += llabs(v - piv);
      }
      sum += c;
      cout << piv << " " << sum << endl;
      continue;
    }
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:26:12: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   26 |       std::sort(ps.begin(), ps.end());
      |            ^~~~
      |            qsort
Language: C++


#include <bits/stdc++.h>
#define  _for(i, end) for (__typeof(end) i = 0; i < (end); i += 1)
using namespace std;

typedef long long ll;

#define int ll;
void printMedians(ll arr[], ll B[], bool P[],int n) {
    priority_queue<ll> s;
    priority_queue<ll, vector<ll>, greater<ll> > g;
    set<int> st;
    ll medl = arr[0], medr = arr[0], sum = B[0];
    s.push(arr[0]);
    st.insert(arr[0]);
    for (int i = 1; i < n; i++) {
        if(P[i])cout << medl << " " << sum << endl;
        ll x = arr[i];
        ll mi_t = *st.begin(), mx_t = *st.rbegin(),medl_t = medl, medr_t = medr;

        if (s.size() > g.size()) {
            if (x <= (medl + medr)/2) {
                g.push(s.top());
                s.pop();
                s.push(x);
            } else
                g.push(x);

            medl = min(s.top(),g.top()),medr = max(s.top(), g.top());
        }

            // case2(both heaps are balanced)
        else if (s.size() == g.size()) {
            if (x < (medl + medr)/2) {
                s.push(x);
                medl = medr = (ll) s.top();
            } else {
                g.push(x);
                medl = medr = (ll) g.top();
            }
        }

            // case3(right side heap has more elements)
        else {
            if (x > (medl + medr)/2) {
                s.push(g.top());
                g.pop();
                g.push(x);
            } else
                s.push(x);

            medl = min(s.top(),g.top()),medr = max(s.top(), g.top());
        }
        if(i&1)sum += (mx_t - *st.rbegin() + *st.begin() - mi_t + medl_t - medl + medr - medr_t);
        else sum += medr - medl;
        sum += B[i];
        st.insert(x);
    }

}

ll A[202020], B[202002];
bool P[202020];
#undef int
int main() {
    int Q;
    cin >> Q;
    int ind = 0;
    _for(i, Q) {
        int a, b, c;
        cin >> a;
        if (a == 1) {
            cin >> b >> c;
            A[ind] = b, B[ind] = c;
            ind ++;
        }
        if (a == 2)P[ind] = 1;
    }
    printMedians(A,B,P,ind + 1);
}


Compiler output:
a.cc:8:15: error: expected ')' before ';' token
    8 | #define int ll;
      |               ^
a.cc:9:46: note: in expansion of macro 'int'
    9 | void printMedians(ll arr[], ll B[], bool P[],int n) {
      |                                              ^~~
a.cc:9:18: note: to match this '('
    9 | void printMedians(ll arr[], ll B[], bool P[],int n) {
      |                  ^
a.cc:9:50: error: 'n' does not name a type
    9 | void printMedians(ll arr[], ll B[], bool P[],int n) {
      |                                                  ^
Language: C++

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

int main() {
  int N,K ;
cin >> N >> K;
string S ;
  cin >> S;
  if (S.at(K-1) == 'A'); {
  S.at(K-1) = 'a'
}
else if (S.at(K-1) == 'B'); {
  S.at(K-1) = 'b'
}
  else if (S.at(K-1) == 'C'); {
  S.at(K-1) = 'c'
}
  
cout << S << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before '}' token
   10 |   S.at(K-1) = 'a'
      |                  ^
      |                  ;
   11 | }
      | ~                 
a.cc:12:1: error: 'else' without a previous 'if'
   12 | else if (S.at(K-1) == 'B'); {
      | ^~~~
a.cc:13:18: error: expected ';' before '}' token
   13 |   S.at(K-1) = 'b'
      |                  ^
      |                  ;
   14 | }
      | ~                 
a.cc:15:3: error: 'else' without a previous 'if'
   15 |   else if (S.at(K-1) == 'C'); {
      |   ^~~~
a.cc:16:18: error: expected ';' before '}' token
   16 |   S.at(K-1) = 'c'
      |                  ^
      |                  ;
   17 | }
      | ~
Language: C++

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

int main() {
  int N,K ;
cin >> N >> K;
string S ;
  cin >> S;
  if (S.at(K-1) == 'A') {
  S.at(K-1) = 'a'
}
else if (S.at(K-1) == 'B') {
  S.at(K-1) = 'b'
}
  else if (S.at(K-1) == 'C') {
  S.at(K-1) = 'c'
}
  
cout << S << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before '}' token
   10 |   S.at(K-1) = 'a'
      |                  ^
      |                  ;
   11 | }
      | ~                 
a.cc:13:18: error: expected ';' before '}' token
   13 |   S.at(K-1) = 'b'
      |                  ^
      |                  ;
   14 | }
      | ~                 
a.cc:16:18: error: expected ';' before '}' token
   16 |   S.at(K-1) = 'c'
      |                  ^
      |                  ;
   17 | }
      | ~
Language: C++

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

int main() {
  int N,K ;
cin >> N >> K;
string S ;
  cin >> S;
  if (S.at(K-1) == 'A') {
  S.at(K-1) = 'a'
}
else if (S.at(K-1) == 'B') {
  S.at(K-1) = 'b'
}
  else if (S.at(K-1) == 'C') {
  S.at(K-1) = 'c'
}
  
cout << S << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before '}' token
   10 |   S.at(K-1) = 'a'
      |                  ^
      |                  ;
   11 | }
      | ~                 
a.cc:13:18: error: expected ';' before '}' token
   13 |   S.at(K-1) = 'b'
      |                  ^
      |                  ;
   14 | }
      | ~                 
a.cc:16:18: error: expected ';' before '}' token
   16 |   S.at(K-1) = 'c'
      |                  ^
      |                  ;
   17 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, K;
  cin >> N >> K;
  string input;
  cin >> input;

  for(int i=0; i<N; i++) {
    if(i == K-1) cout << tolower(input.at(i));
    else cout << input.at(i)
  }

  cout << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:29: error: expected ';' before '}' token
   12 |     else cout << input.at(i)
      |                             ^
      |                             ;
   13 |   }
      |   ~
Language: C++

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


int main () {
  int N, K;
  string S;

  cin >> N >> K >> S;
  S.at(K - 1) = (char)(S.at(K - 1) + 32)
  cout << S << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:41: error: expected ';' before 'cout'
   11 |   S.at(K - 1) = (char)(S.at(K - 1) + 32)
      |                                         ^
      |                                         ;
   12 |   cout << S << endl;
      |   ~~~~
Language: Java

import java.util.*;


public class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      //文字列の長さ
      int n = sc.nextInt();
      //指定する文字の位置
      int k = sc.nextInt();
      
      //対象文字列
      String str = sc.nextLine();
      
      for(int i = 0;i < n;i++){
        if(i == k - 1){
          char c = str.charAt(i);
          String ans = String.valueOf(c);
          System.out.print(ans.toLowerCase());
        }else{
          System.out.print(str.charAt(i));
      }
    }
}

Compiler output:
Main.java:24: error: reached end of file while parsing
}
 ^
1 error
Language: C

#include<stdio.h>

int main(void){
  int n,k;
  scanf("%d %d",&n,&k);
  
  char s[n];
  scanf("%s",s);
  s[k-1]=s[k-1]+32;
  for(int i=0;i<N;i++){
  printf("%c",s[i]);
  }
  printf("\n");
  return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
	// 整数の入力
    string input;
    cin >> input;

    string first = input.substr(0,2);
    string second = input.substr(2,2); 
    
    int first_num = atoi(first.c_str());
    int second_num = atoi(second.c_str());
    
    bool first_MM = true;
    bool second_MM = true;
    
    if(first_MM > 12)
    {
        first_MM = false;
    }
    if(second_MM > 12)
    {
        second_MM = false;
    }
    
    if(first_MM && second_MM)
    {
        // どちらもOK
        cout << "AMBIGUOUS"
    }
    else if(first_MM)
    {
        // MMYY フォーマットのみ
        cout << "MMYY"
    }
    else if(second_MM)
    {
        // YYMM フォーマットのみ
        cout << "YYMM"
    }
    else
    {
        // どちらもだめ   
        cout << "NA"
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:28: error: expected ';' before '}' token
   30 |         cout << "AMBIGUOUS"
      |                            ^
      |                            ;
   31 |     }
      |     ~                       
a.cc:35:23: error: expected ';' before '}' token
   35 |         cout << "MMYY"
      |                       ^
      |                       ;
   36 |     }
      |     ~                  
a.cc:40:23: error: expected ';' before '}' token
   40 |         cout << "YYMM"
      |                       ^
      |                       ;
   41 |     }
      |     ~                  
a.cc:45:21: error: expected ';' before '}' token
   45 |         cout << "NA"
      |                     ^
      |                     ;
   46 |     }
      |     ~
Language: C++

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

//yy && mm  yy && mm
//yy && mm  yy || mm
//yy mm
//mm yy

struct ym {
	int value;
	bool is_year;
	bool is_month;

	ym(int num) {
		value = num;
		is_year = isYear(num);
		is_month = isMonth(num);
	}
};

int main()
{
	int s;
	std::cin >> s;

	int upper_2, lower_2;
	upper_2 = s / 100;
	lower_2 = s - upper_2;

	ym upper(upper_2);
	ym lower(lower_2);

	if (upper.is_year && upper.is_month) {
		if (lower.is_year && lower.is_month) {
			std::cout << "AMBIGUOUS" << std::endl;
		}
		else if (lower.is_year) {
			std::cout << "MMYY" << std::endl;
		}
		else if (lower.is_month) {
			std::cout << "YYMM" << std::endl;
		}
		else {
			std::cout << "NA" << std::endl;
		}
	}
	else if (upper.is_year) {
		if (lower.is_month) {
			std::cout << "YYMM" << std::endl;
		}
		else {
			std::cout << "NA" << std::endl;
		}
	}
	else if (upper.is_month) {
		if (lower.is_year) {
			std::cout << "MMYY" << std::endl;
		}
		else {
			std::cout << "NA" << std::endl;
		}
	}
	else {
		std::cout << "NA" << std::endl;
 	}
	return 0;
}

bool isYear(int num) {
	return 0 <= num && num <= 99;
}

bool isMonth(int num) {
	return 1 <= num && num <= 12;
}

Compiler output:
a.cc: In constructor 'ym::ym(int)':
a.cc:16:27: error: 'isYear' was not declared in this scope; did you mean 'is_year'?
   16 |                 is_year = isYear(num);
      |                           ^~~~~~
      |                           is_year
a.cc:17:28: error: 'isMonth' was not declared in this scope; did you mean 'is_month'?
   17 |                 is_month = isMonth(num);
      |                            ^~~~~~~
      |                            is_month
Language: C++

#include <stdio.h>
#include <string.h>


int main(){
	int N;	//文字列の長さN
	int K;	//文字列のK番目を指定するための変数
	char S[50];		//入力した文字列

	scanf_s("%d %d", &N, &K);
	scanf_s("%s", &S,50);

	S[K - 1] = S[K - 1] + 32;
	printf("%s\n", S);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |         scanf_s("%d %d", &N, &K);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <stdio.h>
#include <string.h>


int main(){
	int N;	//文字列の長さN
	int K;	//文字列のK番目を指定するための変数
	char S[50]={ ' \0 ' };		//入力した文字列

	scanf_s("%d %d", &N, &K);
	scanf_s("%s", &S,50);

	S[K - 1] = S[K - 1] + 32;
	printf("%s\n", S);
}

Compiler output:
a.cc:8:22: warning: multi-character character constant [-Wmultichar]
    8 |         char S[50]={ ' \0 ' };          //入力した文字列
      |                      ^~~~~~
a.cc: In function 'int main()':
a.cc:8:22: error: narrowing conversion of '2097184' from 'int' to 'char' [-Wnarrowing]
a.cc:10:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |         scanf_s("%d %d", &N, &K);
      |         ^~~~~~~
      |         scanf
Language: C

#include <stdio.h>
#include <string.h>


int main(){
	int N;	//文字列の長さN
	int K;	//文字列のK番目を指定するための変数
	char S[50]{ ' \0 ' };		//入力した文字列

	scanf_s("%d %d", &N, &K);
	scanf_s("%s", &S,50);

	S[K - 1] = S[K - 1] + 32;
	printf("%s\n", S);
}

Compiler output:
main.c: In function 'main':
main.c:8:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    8 |         char S[50]{ ' \0 ' };           //入力した文字列
      |                   ^
main.c:8:21: warning: multi-character character constant [-Wmultichar]
    8 |         char S[50]{ ' \0 ' };           //入力した文字列
      |                     ^~~~~~
main.c:8:27: error: expected ';' before '}' token
    8 |         char S[50]{ ' \0 ' };           //入力した文字列
      |                           ^~
      |                           ;
main.c:10:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   10 |         scanf_s("%d %d", &N, &K);
      |         ^~~~~~~
      |         scanf
main.c:11:24: error: 'S' undeclared (first use in this function)
   11 |         scanf_s("%s", &S,50);
      |                        ^
main.c:11:24: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

<?php
	fscanf(STDIN,"%d %d",$n,$k);
	$s = fgets(STDIN);
	$s[$k-1] = strtolower($s[$k-1]);
	echo $s."\n";
?>

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
<?php
^
Main.java:3: error: class, interface, enum, or record expected
	$s = fgets(STDIN);
	^
Main.java:4: error: class, interface, enum, or record expected
	$s[$k-1] = strtolower($s[$k-1]);
	^
Main.java:5: error: class, interface, enum, or record expected
	echo $s."\n";
	^
Main.java:6: error: class, interface, enum, or record expected
?>
^
5 errors
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n, k;
  cin >> n >> k;
  string str;
  cin >> str;
  string ans = "";
  rep(i, n){
    if(i == k-1){
      if(str[i] == 'A') ans += 'a';
      if(str[i] == 'B') ans += 'b';
      if(str[i] == 'C') ans += 'c';
    }else{
      ans += str[i];
    }
  }
  cout << ans << endl;
  return 0;
}

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

int N,K;
string s;
int main(){
  cin >> N >> K >> s;
  K--;
  if(s[K]=='A') s[K]='a';
  else if(s[K]=='B') s[K]='b';
  else if(s[K]=='C') s[K]='c';
  cout << s << endl;
}

Compiler output:
a.cc:2:1: error: 'string' does not name a type
    2 | string s;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> N >> K >> s;
      |   ^~~
a.cc:4:20: error: 's' was not declared in this scope
    4 |   cin >> N >> K >> s;
      |                    ^
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout << s << endl;
      |   ^~~~
a.cc:9:16: error: 'endl' was not declared in this scope
    9 |   cout << s << endl;
      |                ^~~~
Language: C

#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
typedef vector<int> vi;
typedef long long ll;
typedef pair<int,int> pii;
typedef double db;
const ll mod=1000000007;
ll powmod(ll a,ll b) {ll res=1;a%=mod;assert(b>=0);for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}


int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n,k;
	cin>>n>>k;
	char word[n];
	for(int i =0 ;i < n; i++){
		char temp;
		cin>>temp;
		if(i == k-1)temp = tolower(temp);
		word[i] = temp;
	}
	cout<<word;
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,k;
  cin>>n>>k;
  char s[1000];
  for(int i=1;i<=n;i++)
  {
    cin>>s[i];
  }
  s[k]=s[k]+' ';
  for(int i=0;i<=n;i+=)
  {
    cout<<s[i];
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: expected primary-expression before ')' token
   13 |   for(int i=0;i<=n;i+=)
      |                       ^
Language: C++

#include<bits/stdc+=.h>
using namespace std;
int main()
{
  int n,k;
  cin>>n>>k;
  char s[1000];
  for(int i=1;i<=n;i++)
  {
    cin>>s[i];
  }
  s[k]=s[k]+' ';
  for(int i=0;i<=n;i+=)
  {
    cout<<s[i];
  }
}

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

#include<iostream>
#include<string.h>
using namespace std;
int main()
{
    int n,j;
    cin>>n;
    string s;
    cin>>s;
    j=strlen(s);
    j=j-1;
    for(int i=0;i<=j;i++){
        s[i]=s[i]+n;

}
cout<<j;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   10 |     j=strlen(s);
      |              ^
      |              |
      |              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: Java

#include<iostream>
#include<string.h>
using namespace std;
int main()
{
    int n,j;
    cin>>n;
    string s;
    cin>>s;
    j=strlen(s);
    j=j-1;
    for(int i=0;i<=j;i++){
        s[i]=s[i]+n;

}
cout<<j;
return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include<string.h>
^
Main.java:7: error: not a statement
    cin>>n;
       ^
Main.java:9: error: not a statement
    cin>>s;
       ^
Main.java:16: error: not a statement
cout<<j;
    ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
6 errors
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n,k;
  string s;
  cin >> n >> k;
  cin >> s;
  s[k-1]=tolower([k-1]);
  cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ',' before '-' token
    8 |   s[k-1]=tolower([k-1]);
      |                    ^
      |                    ,
a.cc:8:20: error: expected identifier before '-' token
a.cc: In lambda function:
a.cc:8:23: error: expected '{' before ')' token
    8 |   s[k-1]=tolower([k-1]);
      |                       ^
a.cc: In function 'int main()':
a.cc:8:17: error: no matching function for call to 'tolower(main()::<lambda()>)'
    8 |   s[k-1]=tolower([k-1]);
      |          ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'main()::<lambda()>' to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N,K;
  string S;
  cin >> N >> K;
  cin >> S;
  s[K-1]= tolower(s[K-1]);
  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 's' was not declared in this scope
    8 |   s[K-1]= tolower(s[K-1]);
      |   ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N,K;
  string S;
  cin >> N >> K;
  cin >> S;
  s[k-1]= tolower(s[k-1]);
  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 's' was not declared in this scope
    8 |   s[k-1]= tolower(s[k-1]);
      |   ^
a.cc:8:5: error: 'k' was not declared in this scope
    8 |   s[k-1]= tolower(s[k-1]);
      |     ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
  int n,k;
  string s;
  cin>>n>>k>>s;
  if (s[k-1]=='A'){
    s[k-]='a';
  }else if(s[k-1]=='B'){
    s[k-1]='b';
  }else if (s[k-1]=='C'){
    s[k-1]='c';
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected primary-expression before ']' token
    9 |     s[k-]='a';
      |         ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
  int n,k;
  string s;
  cin>>n>>k>>s;
  if (s[k-1]=='A'){
    s[k-]=='a';
  }else if(s[k-1]=='B'){
    s[k-1]=='b';
  }else if (s[k-1]=='C'){
    s[k-1]=='c';
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected primary-expression before ']' token
    9 |     s[k-]=='a';
      |         ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
  int n,k;
  string s;
  cin>>n>>k>>s;
  if (s[k-1]='A'){
    s[k-]='a';
  }else if(s[k-1]='B'){
    s[k-1]='b';
  }else if (s[k-1]='C'){
    s[k-1]='c';
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected primary-expression before ']' token
    9 |     s[k-]='a';
      |         ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n,k;
  string s;
  
  cin>>n>>k>>s;
  
  s.at(k-1)=a.at(k-1)+32;
  
  cout<<s;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'a' was not declared in this scope
    9 |   s.at(k-1)=a.at(k-1)+32;
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,k;
  string s;
  cin>>n>>k>>s;
  if(s.at(k-1)=="A"){s.at(k-1)="a"}
  else if (s.at(k-1)=="B"){s.at(k-1)="b"}
  else{s.at(k-1)="c"}
cout<<s<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(s.at(k-1)=="A"){s.at(k-1)="a"}
      |      ~~~~~~~~~^~~~~
a.cc:7:32: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    7 |   if(s.at(k-1)=="A"){s.at(k-1)="a"}
      |                                ^~~
      |                                |
      |                                const char*
a.cc:7:35: error: expected ';' before '}' token
    7 |   if(s.at(k-1)=="A"){s.at(k-1)="a"}
      |                                   ^
      |                                   ;
a.cc:8:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   else if (s.at(k-1)=="B"){s.at(k-1)="b"}
      |            ~~~~~~~~~^~~~~
a.cc:8:38: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    8 |   else if (s.at(k-1)=="B"){s.at(k-1)="b"}
      |                                      ^~~
      |                                      |
      |                                      const char*
a.cc:8:41: error: expected ';' before '}' token
    8 |   else if (s.at(k-1)=="B"){s.at(k-1)="b"}
      |                                         ^
      |                                         ;
a.cc:9:18: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |   else{s.at(k-1)="c"}
      |                  ^~~
      |                  |
      |                  const char*
a.cc:9:21: error: expected ';' before '}' token
    9 |   else{s.at(k-1)="c"}
      |                     ^
      |                     ;
Language: C++

#include<bits/stdc++>
using namespace std;
int main()
{
int n,k,i;
  cin >> n >> k;
  vector<char> p(n);
  
  for(i=0;i<n;++i)
  {
  cin >> p.at(i);
    if(i==k) p.at(i)=p.at(i)+'A'-'a';
   cout << p.at(i);
  }


return 0;
}

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

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

//type
#define ll long long
typedef pair<int, int> P;
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007    //10^9+7:合同式の法
#define MAXR 100000       //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first      //pairの一つ目の要素
#define S second     //pairの二つ目の要素
#define Z class
// OTHER
// xの二乗を返す (関数テンプレート版)
template <typename T>
T square(T x) { return x * x; }
#define chmax(x, y) (x = max(x, y))
#define chmin(x, y) (x = min(x, y))
// loop
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repd(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= (b); i++)
#define FORD(i, a, b) for (ll i = a; i >= (b); i--)
#define FORA(i, I) for (const auto &i : I)

// vector
#define ALL(x) x.begin(), x.end()

// output
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define isYES(x) printf("%s\n", (x) ? "YES" : "NO")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define ln cout << '\n'
template <Z A>
void pr(A a)
{
  cout << a;
  ln;
}
template <Z A, Z B>
void pr(A a, B b)
{
  cout << a << ' ';
}

int ans = 0;
bool check = 0;
string s, t;
int N = 3;
vector<int> v(N);
int a, b;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

int main()
{
  cin >> a >> b;
  cin >> s;
  s[k - 1] += 32;
  pr(s);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:65:5: error: 'k' was not declared in this scope
   65 |   s[k - 1] += 32;
      |     ^
Language: C++

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

//type
#define ll long long
typedef pair<int, int> P;
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007    //10^9+7:合同式の法
#define MAXR 100000       //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first      //pairの一つ目の要素
#define S second     //pairの二つ目の要素
#define Z class
// OTHER
// xの二乗を返す (関数テンプレート版)
template <typename T>
T square(T x) { return x * x; }
#define chmax(x, y) (x = max(x, y))
#define chmin(x, y) (x = min(x, y))
// loop
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repd(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= (b); i++)
#define FORD(i, a, b) for (ll i = a; i >= (b); i--)
#define FORA(i, I) for (const auto &i : I)

// vector
#define ALL(x) x.begin(), x.end()

// output
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define isYES(x) printf("%s\n", (x) ? "YES" : "NO")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define ln cout << '\n'
template <Z A>
void pr(A a)
{
  cout << a;
  ln;
}
template <Z A, Z B>
void pr(A a, B b)
{
  cout << a << ' ';
}

int ans = 0;
bool check = 0;
string s, t;
int N = 3;
vector<int> v(N);
int a, b;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

int main()
{
  cin >> a >> b;
  cin >> s;
  s[k-1]+=32;
  rep(s);
}

Compiler output:
a.cc:66:8: error: macro "rep" requires 2 arguments, but only 1 given
   66 |   rep(s);
      |        ^
a.cc:24:9: note: macro "rep" defined here
   24 | #define rep(i, n) for (int i = 0; i < (n); i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:65:5: error: 'k' was not declared in this scope
   65 |   s[k-1]+=32;
      |     ^
a.cc:66:3: error: 'rep' was not declared in this scope
   66 |   rep(s);
      |   ^~~
Language: C++

//N=jumlah huruf->3
//K=huruf keberapa yg mau dikecilin->1
//S=kata pake huruf besar semua->aBC(output)

#include <stdio.h>

int main ()
{
	int X;
	int Y;
	char Z[60];
	
	scanf("%d %d", &X, &Y);
	scanf("%s", Z);
	
	Z = Z[Y-1]+32;
	
	printf("%s",Z);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: incompatible types in assignment of 'int' to 'char [60]'
   16 |         Z = Z[Y-1]+32;
      |         ~~^~~~~~~~~~~
Language: C++

//N=jumlah huruf->3
//K=huruf keberapa yg mau dikecilin->1
//S=kata pake huruf besar semua->aBC(output)

#include <stdio.h>

int main ()
{
	int X;
	int Y;
	char Z[50];
	
	scanf("%d %d", &X, &Y);
	scanf("%s", Z);
	
	Z = Z[Y-1]+32;
	
	printf("%s",Z);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: incompatible types in assignment of 'int' to 'char [50]'
   16 |         Z = Z[Y-1]+32;
      |         ~~^~~~~~~~~~~
Language: C++

//N=jumlah huruf->3
//K=huruf keberapa yg mau dikecilin->1
//S=kata pake huruf besar semua->aBC(output)

#include <stdio.h>

int main ()
{
	int X;
	int Y;
	char Z[50];
	
	scanf("%d %d", &X, &Y);
	scanf("%s", Z);
	
	Z = Z[K-1]+32;
	
	printf("%s",Z);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: 'K' was not declared in this scope
   16 |         Z = Z[K-1]+32;
      |               ^
Language: C++

//N=jumlah huruf->3
//K=huruf keberapa yg mau dikecilin->1
//S=kata pake huruf besar semua->aBC(output)

#include <stdio.h>

int main ()
{
	int N;
	int K;
	char S[50];
	
	scanf("%d %d", &N, &K);
	scanf("%s", S);
	
	S = S[K-1]+32;
	
	printf("%s",S);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: incompatible types in assignment of 'int' to 'char [50]'
   16 |         S = S[K-1]+32;
      |         ~~^~~~~~~~~~~
Language: C++

int main(){
	int a, b;
	char str2 [30];
	
	scanf ("%d %d", &a, &b);
	scanf ("%s", str2);
	
	str2[b-1] = str2[b-1] + 32;
	
	printf("%s", str2);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
    5 |         scanf ("%d %d", &a, &b);
      |         ^~~~~
a.cc:10:9: error: 'printf' was not declared in this scope
   10 |         printf("%s", str2);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
Language: C++

#include <stdio.h>

int main() {
	int A;
	int B;
	char s[55];
	
	scanf("%d %d", &A, &B);
	scanf("%s", s);
	s[B-1]+= 32;
	printf("%s",s;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: expected ')' before ';' token
   11 |         printf("%s",s;
      |               ~      ^
      |                      )
Language: C++

#include <stdio.h>

int main() {
	int number, character;
	scanf("%d %d", &number, &character);
	
	char string[n+1];
	scanf("%s", string);
	
	string[character-1] += 32;
	printf("%s\n", string);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'n' was not declared in this scope
    7 |         char string[n+1];
      |                     ^
a.cc:8:21: error: 'string' was not declared in this scope; did you mean 'stdin'?
    8 |         scanf("%s", string);
      |                     ^~~~~~
      |                     stdin
Language: C++

#include <stdio.h>

int main() {
	int A;
	int B;
	
	scanf("%d %d, &A, &B);
	char S[55];
	scanf("%s", S);
	S[B-1]+= 32;
	printf("%s", S);
	
	return 0;
}

Compiler output:
a.cc:7:15: warning: missing terminating " character
    7 |         scanf("%d %d, &A, &B);
      |               ^
a.cc:7:15: error: missing terminating " character
    7 |         scanf("%d %d, &A, &B);
      |               ^~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: expected primary-expression before 'char'
    8 |         char S[55];
      |         ^~~~
a.cc:9:21: error: 'S' was not declared in this scope
    9 |         scanf("%s", S);
      |                     ^
Language: C

#include <stdio.h>


int main() {
	int a ;
	int b ;
	
	scanf("%d%d",&a,&b);
	getchar()
	
	char c[55] ;
	c [b-2] + 32 ;
	scanf("%s", c) ;
	printf("%s", c) ;
    
	
	return 0;
	
}

Compiler output:
main.c: In function 'main':
main.c:9:18: error: expected ';' before 'char'
    9 |         getchar()
      |                  ^
      |                  ;
   10 | 
   11 |         char c[55] ;
      |         ~~~~      
main.c:12:9: error: 'c' undeclared (first use in this function)
   12 |         c [b-2] + 32 ;
      |         ^
main.c:12:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

include <stdio.h>
 
int main() {
	int N, K, X;
	char nama [12];

	scanf("%d %d", &N, &K);
	scanf ("%s", &nama);
	X = K-1 ;
	nama [X] = nama [X]+ 32 ;

	printf("%s", nama ) ;
	
	return 0;
}

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

#include <stdio.h>
int main ()
{
	int N,K ;
	char nama[52];
	scanf("%d%d %s",&N,&K,nama);
	nama[K-1]= nama[K-1]+32;
	printf("%s\n",nama);
	return 0;
	

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

#include <stdio.h>

int main () {
    int N,K ;
    char S[100];
    scanf("%d %d, &N, &K) ;
    scanf("%s", &S) ;
    S[K-1] += 32 ; 
    printf("%s\n", S) ;
    return 0 ; 
}


Compiler output:
a.cc:6:11: warning: missing terminating " character
    6 |     scanf("%d %d, &N, &K) ;
      |           ^
a.cc:6:11: error: missing terminating " character
    6 |     scanf("%d %d, &N, &K) ;
      |           ^~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:20: error: expected ')' before ';' token
    7 |     scanf("%s", &S) ;
      |                    ^~
      |                    )
a.cc:6:10: note: to match this '('
    6 |     scanf("%d %d, &N, &K) ;
      |          ^
Language: C++

#include <stdio.h>

int main () {
    int N,K ;
    char S[100];
    scanf("%d %d, &N, &K) ;
    scanf("%s", &S) ;
    S[K-1] = S[K-1] + 32 ; 
    printf("%s\n", S) ;
    return 0 ; 
}


Compiler output:
a.cc:6:11: warning: missing terminating " character
    6 |     scanf("%d %d, &N, &K) ;
      |           ^
a.cc:6:11: error: missing terminating " character
    6 |     scanf("%d %d, &N, &K) ;
      |           ^~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:20: error: expected ')' before ';' token
    7 |     scanf("%s", &S) ;
      |                    ^~
      |                    )
a.cc:6:10: note: to match this '('
    6 |     scanf("%d %d, &N, &K) ;
      |          ^
Language: C++

#include <stdio.h>

int main () {
    int N,K ;
    char S[60];
    scanf("%d %d, &N, &K) ;
    scanf("%s", &S) ;
    S[K-1] += 32 ;
    printf("%s\n", S) ;
    return 0 ; 
}


Compiler output:
a.cc:6:11: warning: missing terminating " character
    6 |     scanf("%d %d, &N, &K) ;
      |           ^
a.cc:6:11: error: missing terminating " character
    6 |     scanf("%d %d, &N, &K) ;
      |           ^~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:20: error: expected ')' before ';' token
    7 |     scanf("%s", &S) ;
      |                    ^~
      |                    )
a.cc:6:10: note: to match this '('
    6 |     scanf("%d %d, &N, &K) ;
      |          ^
Language: C++

#include <stdio.h>

int main () {
    int N,K ;
    char S[52];
    scanf("%d %d, &N, &K) ;
    scanf("%s", &S) ;
    S[K-1]+=32 ;
    printf("%s\n", S) ;
    return 0 ; 
}


Compiler output:
a.cc:6:11: warning: missing terminating " character
    6 |     scanf("%d %d, &N, &K) ;
      |           ^
a.cc:6:11: error: missing terminating " character
    6 |     scanf("%d %d, &N, &K) ;
      |           ^~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:20: error: expected ')' before ';' token
    7 |     scanf("%s", &S) ;
      |                    ^~
      |                    )
a.cc:6:10: note: to match this '('
    6 |     scanf("%d %d, &N, &K) ;
      |          ^
Language: C

#include <stdio.h>

int main () {
	int sLength, sLetter;
	char text[55];
	
	scanf("%d%d", &sLength, &sLetter);
	getchar();
	scanf("%s", &text);
	text [sLetter] += 32;
	printf("%s"\n, text);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:20: error: stray '\' in program
   11 |         printf("%s"\n, text);
      |                    ^
main.c:11:20: error: expected ')' before 'n'
   11 |         printf("%s"\n, text);
      |               ~    ^~
      |                    )
Language: C++

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

	int z;
 k;
	char A, B, C;
	char string[55];
	
	scanf("%d %d", &z, &k);
	getchar();
	scanf("%s", &string);
	
	string[k-1] += 32;
	printf("%s", string);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:2: error: 'k' was not declared in this scope
    5 |  k;
      |  ^
Language: C++

#include <string.h>
#include <stdio.h>

int main () {
	int a, b;
	char c [] ;
	
	scanf ("%d %d" ,&a, &b); getchar();
	scanf ("%s", &c);
	
	c[b] = c[b]+32;
	
	printf ("%s",c);
	
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: storage size of 'c' isn't known
    6 |         char c [] ;
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  string X, Atoa;
  cin >> A >> B >> X;
  Atoa = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  for(int i = 0, i < 26; i++) {
    if(X.at(B) = Atoa.at(i)) {
      X.at(B) = Atoa.at(i + 26);
      break;
    }
  }
  cout << X << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected ';' before '<' token
    8 |   for(int i = 0, i < 26; i++) {
      |                   ^~
      |                   ;
a.cc:8:20: error: expected primary-expression before '<' token
    8 |   for(int i = 0, i < 26; i++) {
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end()
 
int main() {
 ll N,K;
  cin>>N>>K;
  string S;
  cin>>S;
  for(ll i=0;i<N;i++) {
 if(i==K-1) {
if(S[i]=="A") {
  cout<<"a";
}
   else if(S[i]=="B") {
cout<<"b";
   }
else {
  cout<<"c";
}
 }
    
    else {
      cout<<S[i];
    }
  }
  
  cout<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 | if(S[i]=="A") {
a.cc:16:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |    else if(S[i]=="B") {