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

#include <iostream>
using namespace std;
int main(){
	int tmp, num[35] = { -1 };
	for (int i = 0; i < 28;i++){
		cin >> tmp;
		num[tmp] = 1;
	}
	for (i = 0; i < 28; i++){
		if (num[i] == -1)
			cout << num[i] << endl;
	}
}

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

#include <iostream>
#include <cstring>
using namespace std;
int main(){
	int tmp, num[35];
	memset(num, -1, sizeof(num));
	for (int i = 0; i < 28;i++){
		cin >> tmp;
		num[tmp] =	1;
	}
	for (int i = 1; i < 31; i++){
		if (num[i] == -1)
			cout << num[i] << endl;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: expected '}' at end of input
   14 |         }
      |          ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostram>
using namespace std;

int main(){
	bool id[31];
	for(int i = 0; i < 28; i++){
		int tmp;
		cin >> tmp;
		id[tmp] = true;
	}

	for(int i = 1; i <= 30; i++){
		if(!id[i]) cout << i << endl;
	}
	return 0;
}

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

#inculude<iostream>

using namespace std;

int main(){
  bool student[30];
  int n;
  
  for(int i = 0; i< 30; i++){
    student[i] = 0;
  }

  for(int i = 0; i< 30; i++){
    cin >> n;
    student[n] = 1;
  }

  for(int i = 0; i< 30; i;+){
    if(student[i] == 0) cout << i << endl;
  }

  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inculude; did you mean #include?
    1 | #inculude<iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:14:5: error: 'cin' was not declared in this scope
   14 |     cin >> n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inculude<iostream>
a.cc:18:26: error: expected ')' before ';' token
   18 |   for(int i = 0; i< 30; i;+){
      |      ~                   ^
      |                          )
a.cc:18:28: error: expected primary-expression before ')' token
   18 |   for(int i = 0; i< 30; i;+){
      |                            ^
Language: C++

var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr=(input.trim()).split("\n").map(Number);
for(i=1;i<=30;i++){
if(Arr.indexOf(i)==-1)console.log(i);
}

Compiler output:
a.cc:1:21: warning: multi-character character constant [-Wmultichar]
    1 | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
      |                     ^~~~
a.cc:1:40: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
    1 | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
      |                                        ^~~~~~~~~~~~
a.cc:1:54: warning: multi-character character constant [-Wmultichar]
    1 | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
      |                                                      ^~~~~~
a.cc:1:1: error: 'var' does not name a type
    1 | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
      | ^~~
a.cc:2:1: error: 'var' does not name a type
    2 | var Arr=(input.trim()).split("\n").map(Number);
      | ^~~
a.cc:3:1: error: expected unqualified-id before 'for'
    3 | for(i=1;i<=30;i++){
      | ^~~
a.cc:3:9: error: 'i' does not name a type
    3 | for(i=1;i<=30;i++){
      |         ^
a.cc:3:15: error: 'i' does not name a type
    3 | for(i=1;i<=30;i++){
      |               ^
Language: C++

#include<stdio.h>

int main(){

bool N[31]={};int x;
for(int i=0;i<30;i++)
bool[i]=false;
for(int i=0;i<30;i++)
{scan("%d",&x);N[x]=true;}
for(int i=0;i<30;i++)
{if(N[i]==false)printf("%d\n",(i+1));}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: structured binding declaration cannot have type 'bool'
    7 | bool[i]=false;
      |     ^~~
a.cc:7:5: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:7:6: error: redeclaration of 'auto i'
    7 | bool[i]=false;
      |      ^
a.cc:6:9: note: 'int i' previously declared here
    6 | for(int i=0;i<30;i++)
      |         ^
a.cc:7:5: error: cannot decompose non-array non-class type 'bool'
    7 | bool[i]=false;
      |     ^~~
a.cc:9:2: error: 'scan' was not declared in this scope; did you mean 'scanf'?
    9 | {scan("%d",&x);N[x]=true;}
      |  ^~~~
      |  scanf
Language: C++

#include<stdio.h>

int main(){

bool N[31]={};int x;
for(int i=0;i<30;i++)
bool[i]=false;
for(int i=0;i<30;i++)
{scan("%d",&x);N[x]=true;}
for(int i=0;i<30;i++)
{if(N[i]==false)printf("%d\n",(i+1));}
return 0;
}

#include<stdio.h>

int main(){

bool N[31]={};int x;
for(int i=0;i<30;i++)
N[i]=false;
for(int i=0;i<30;i++)
{scanf("%d",&x);N[x]=true;}
for(int i=0;i<30;i++)
{if(N[i]==false)printf("%d\n",(i+1));}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: structured binding declaration cannot have type 'bool'
    7 | bool[i]=false;
      |     ^~~
a.cc:7:5: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:7:6: error: redeclaration of 'auto i'
    7 | bool[i]=false;
      |      ^
a.cc:6:9: note: 'int i' previously declared here
    6 | for(int i=0;i<30;i++)
      |         ^
a.cc:7:5: error: cannot decompose non-array non-class type 'bool'
    7 | bool[i]=false;
      |     ^~~
a.cc:9:2: error: 'scan' was not declared in this scope; did you mean 'scanf'?
    9 | {scan("%d",&x);N[x]=true;}
      |  ^~~~
      |  scanf
a.cc: At global scope:
a.cc:17:5: error: redefinition of 'int main()'
   17 | int main(){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
Language: C++

#include <stdio.h>

int main(){
    int a[28],i,j,x[30];
    for (i=0;i<28;i++) {
        scanf("%d",&a[i]);
    }
    for (i=0;i<30;i++) {
        x[i]=0;
        for (j=0;j<28;j++) {
            if (a[j]==i) {x[i]=1;}
        }
    }
    for (i=0;i<30;i++) {
        if (x[i]==0) {
            printf("%d\n",i)
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:29: error: expected ';' before '}' token
   16 |             printf("%d\n",i)
      |                             ^
      |                             ;
   17 |         }
      |         ~
Language: C++

include<iostream>
using namespace std;

int main(){
int a[30];
for(int i = 0;i <= 29;i++){
a[i] = 0;
}
for(int ii = 1;ii <= 28;ii++){
int n;
cin >> n;
a[n - 1] = 1;
}
for(int p = 0;p <= 29;p++){
if(a[p] == 0){
cout << p + 1 << endl;
}
}
    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:11:1: error: 'cin' was not declared in this scope
   11 | cin >> n;
      | ^~~
a.cc:16:1: error: 'cout' was not declared in this scope
   16 | cout << p + 1 << endl;
      | ^~~~
a.cc:16:18: error: 'endl' was not declared in this scope
   16 | cout << p + 1 << endl;
      |                  ^~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int n1 = 30;
	int a[n1];
	for (int i = 0; i < 30; i++){
		cin >> a[i];
	}
	sort(a, a + n1);
	for (int i = 0; i < 30; i++){
		if (a[i + 1] - a[i] = 2) 
			cout<<a[i]+1<<endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: lvalue required as left operand of assignment
   12 |                 if (a[i + 1] - a[i] = 2)
      |                     ~~~~~~~~~^~~~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	for (int n = 0; n < 2; n++)
	int a[30] = { 0 };
	for (int i = 0; i < 30; i++){
		cin >> a[i];
	}
	sort(a, a + 30);
	for (int i = 0; i < 30; i++){
		if (a[i + 1] - a[i]==2) 
			cout<<a[i]+1<<endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: 'a' was not declared in this scope
    8 |                 cin >> a[i];
      |                        ^
a.cc:10:14: error: 'a' was not declared in this scope
   10 |         sort(a, a + 30);
      |              ^
Language: C++

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

int main(){
	if (int n = 0; n < 5;n++);
		int a[30] = { 0 };
		for (int i = 0; i < 30; i++){
			cin >> a[i];
		}
		sort(a, a + 30);
		for (int i1 = 0; i1 < 30; i1++){
			if (i1 != 1){
				if (a[i1 + 1] - a[i1] == 2){
					cout << a[i1] + 1 << endl;
				}
				if (a[i1 + 1] - a[i1] == 3){
					cout << a[i1] + 1 << endl << a[i1] + 2 << endl;
					break;
				}
			}
		}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:29: error: expected ')' before ';' token
    6 |         if (int n = 0; n < 5;n++);
      |            ~                ^
      |                             )
a.cc:6:30: error: 'n' was not declared in this scope
    6 |         if (int n = 0; n < 5;n++);
      |                              ^
Language: C++

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

int main(){
	for (int n = 0; n < 5; n++){
		int a[30] = { 0 };
		for (int i = 0; i < 30; i++){
			cin >> a[i];
		}
		sort(a, a + 30);
		for (int i1 = 0; i1 < 30; i1++){
			if (a[i1+1]-a[i] != 1){
				if (a[i1 + 1] - a[i1] == 2){
					cout << a[i1] + 1 << endl;
				}
				if (a[i1 + 1] - a[i1] == 3){
					cout << a[i1] + 1 << endl << a[i1] + 2 << endl;
					break;
				}
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:39: error: 'i' was not declared in this scope; did you mean 'i1'?
   13 |                         if (a[i1+1]-a[i] != 1){
      |                                       ^
      |                                       i1
Language: C++

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

int main(){
	for (int n = 0; n < 5; n++){
		int a[31] = { 0 };
		for (int i = 0; i < 28; i++){
                        int n;
			cin >> n;
}
                   int a[n]={1}
                for (int i=1; i<31;i++){
                    if (a(i)=0){
                    cout<<i<<endl}
}  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: conflicting declaration 'int a [n]'
   12 |                    int a[n]={1}
      |                        ^
a.cc:7:21: note: previous declaration as 'int a [31]'
    7 |                 int a[31] = { 0 };
      |                     ^
a.cc:13:31: error: 'i' was not declared in this scope
   13 |                 for (int i=1; i<31;i++){
      |                               ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

int main(){
	for (int n = 0; n < 5; n++){
		int a[31] = { 0 };
		for (int i = 0; i < 28; i++){
			int n;
			cin >> n;
			int a[n] = { 1 };
		}
		
		for (int i = 1; i<31; i++){
			if ( a(i) == 0 ){
				cout << i << endl;
			}
		}
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: 'a' cannot be used as a function
   15 |                         if ( a(i) == 0 ){
      |                              ~^~~
a.cc:19:10: error: expected '}' at end of input
   19 |         }
      |          ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

int main(){
	
		int t[31] = { 0 };
		int n;
		for (int i = 0; i < 28; i++){
			cin >> n;
			int t[n] = { 1 };
		}
		
		for (int i = 1; i<31; i++){
			if  ( t(i) == 0 ){
				cout << i << endl;
			}
		}
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:32: error: 't' cannot be used as a function
   15 |                         if  ( t(i) == 0 ){
      |                               ~^~~
Language: C++

#include <cstdio>

using namespace std;

bool count[30];

int main(){
  for(int i = 0; i < 30; i++){
    count[i] = false;
  }
  for(int i = 0; i < 28; i++){
    int a;
    scanf("%d", &a);
    count[a] = true;
  }
  for(int i = 0; i < 30; i++){
    if(count[a]){
      printf("%d\n", i);
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: 'a' was not declared in this scope
   17 |     if(count[a]){
      |              ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int yj[30] = ();
	int unco[28] = ();
	int a;
	cin >> unco[28];
	for(i = 0, i < 28 , i++){
		yj[i] = i - 1;
		a = unco[i];
		yj[a - 1] = 0;
	}
	for(i = 0, i < 30 , i++){
		if(yj[i] != 0)
			cout << yj[i]<< endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:23: error: expected primary-expression before ')' token
    5 |         int yj[30] = ();
      |                       ^
a.cc:6:25: error: expected primary-expression before ')' token
    6 |         int unco[28] = ();
      |                         ^
a.cc:9:13: error: 'i' was not declared in this scope
    9 |         for(i = 0, i < 28 , i++){
      |             ^
a.cc:14:9: error: expected primary-expression before 'for'
   14 |         for(i = 0, i < 30 , i++){
      |         ^~~
a.cc:13:10: error: expected ';' before 'for'
   13 |         }
      |          ^
      |          ;
   14 |         for(i = 0, i < 30 , i++){
      |         ~~~
a.cc:14:9: error: expected primary-expression before 'for'
   14 |         for(i = 0, i < 30 , i++){
      |         ^~~
a.cc:13:10: error: expected ')' before 'for'
   13 |         }
      |          ^
      |          )
   14 |         for(i = 0, i < 30 , i++){
      |         ~~~
a.cc:9:12: note: to match this '('
    9 |         for(i = 0, i < 28 , i++){
      |            ^
a.cc:18:9: error: expected primary-expression before 'return'
   18 |         return 0;
      |         ^~~~~~
a.cc:17:10: error: expected ';' before 'return'
   17 |         }
      |          ^
      |          ;
   18 |         return 0;
      |         ~~~~~~
a.cc:18:9: error: expected primary-expression before 'return'
   18 |         return 0;
      |         ^~~~~~
a.cc:17:10: error: expected ')' before 'return'
   17 |         }
      |          ^
      |          )
   18 |         return 0;
      |         ~~~~~~
a.cc:14:12: note: to match this '('
   14 |         for(i = 0, i < 30 , i++){
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int yj[30] = {};
	int unco[28] = {};
	int a;
	cin >> unco[28];
	for(i = 0, i < 28 , i++){
		yj[i] = i - 1;
		a = unco[i];
		yj[a - 1] = 0;
	}
	for(i = 0, i < 30 , i++){
		if(yj[i] != 0)
			cout << yj[i]<< endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
    9 |         for(i = 0, i < 28 , i++){
      |             ^
a.cc:14:9: error: expected primary-expression before 'for'
   14 |         for(i = 0, i < 30 , i++){
      |         ^~~
a.cc:13:10: error: expected ';' before 'for'
   13 |         }
      |          ^
      |          ;
   14 |         for(i = 0, i < 30 , i++){
      |         ~~~
a.cc:14:9: error: expected primary-expression before 'for'
   14 |         for(i = 0, i < 30 , i++){
      |         ^~~
a.cc:13:10: error: expected ')' before 'for'
   13 |         }
      |          ^
      |          )
   14 |         for(i = 0, i < 30 , i++){
      |         ~~~
a.cc:9:12: note: to match this '('
    9 |         for(i = 0, i < 28 , i++){
      |            ^
a.cc:18:9: error: expected primary-expression before 'return'
   18 |         return 0;
      |         ^~~~~~
a.cc:17:10: error: expected ';' before 'return'
   17 |         }
      |          ^
      |          ;
   18 |         return 0;
      |         ~~~~~~
a.cc:18:9: error: expected primary-expression before 'return'
   18 |         return 0;
      |         ^~~~~~
a.cc:17:10: error: expected ')' before 'return'
   17 |         }
      |          ^
      |          )
   18 |         return 0;
      |         ~~~~~~
a.cc:14:12: note: to match this '('
   14 |         for(i = 0, i < 30 , i++){
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int yj[30] = {};
	int unco[28] = {};
	int a;
	cin >> unco[28];
	for(i = 0; i < 28 ; i++){
		yj[i] = i - 1;
		a = unco[i];
		yj[a - 1] = 0;
	}
	for(i = 0; i < 30 ; i++){
		if(yj[i] != 0)
			cout << yj[i]<< endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
    9 |         for(i = 0; i < 28 ; i++){
      |             ^
a.cc:14:13: error: 'i' was not declared in this scope
   14 |         for(i = 0; i < 30 ; i++){
      |             ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int student[31];
	for(int i=0;i<31;i++){
		student[i]=0;
	}
	for(int i=0;i<28;i++){
		int number;
		cin>>number;
		student[number]=1;
	}
	for(int i=1;i<30;i++){
		if(student[i]==0){
			cout<<i<<endl;
		}
	}
	return 0;
}
javascript:void(0)

Compiler output:
a.cc:21:1: error: 'javascript' does not name a type
   21 | javascript:void(0)
      | ^~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define pb push_back

using namespace std;

int main() {
	//freopen("0511.inp", "r", stdin);
	bool b[31]; memset(b, false, sizeof(b));
	loop(i, 0, 28) {
		int n; cin >> n;
		b[n] = true;
	}
	loop(i, 1, 31) if (!b[i]) cout << i << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: 'memset' was not declared in this scope
   14 |         bool b[31]; memset(b, false, sizeof(b));
      |                     ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <cstdio>
  +++ |+#include <cstring>
    7 | #define loop(i,a,b) for(int i=a;i<b;i++)
Language: C++

 #include <iostream>
  2 using namespace std;
  3 
  4 int main(void)
  5 {
  6   bool a[30] = {false};
  7   int n, i;
  8   
  9   for(i = 0; i < 28; i++){
 10     cin >> n;
 11     a[n] = true;
 12     }
 13   for(i = 1; i <= 30; i++){
 14     if(a[i] == false){
 15       cout << i << endl;
 16       }
 17     }
 18   return (0);
 19 }

Compiler output:
a.cc:2:3: error: expected unqualified-id before numeric constant
    2 |   2 using namespace std;
      |   ^
a.cc:3:3: error: expected unqualified-id before numeric constant
    3 |   3
      |   ^
Language: C++

int main() {
	int M[28],A[31],o=0;
	for(int i=0;i<28;i++){
		cin >> M[i];
	}
	for(int i=0;i<28;i++){
		A[M[i]]=M[i];
	}
	for(int i=0;i<30;i++){
		if(A[i+1]==i+1){
			
		}
		else{
			o++;
		}
	}
	cout << o << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'cin' was not declared in this scope
    4 |                 cin >> M[i];
      |                 ^~~
a.cc:17:9: error: 'cout' was not declared in this scope
   17 |         cout << o << endl;
      |         ^~~~
a.cc:17:22: error: 'endl' was not declared in this scope
   17 |         cout << o << endl;
      |                      ^~~~
Language: C++

using namespace std;

int main() {
	int M[28],A[31],o=0;
	for(int i=0;i<28;i++){
		cin >> M[i];
	}
	for(int i=0;i<28;i++){
		A[M[i]]=M[i];
	}
	for(int i=1;i<31;i++){
		if(A[i]==i){
			
		}
		else{
			cout << i << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'cin' was not declared in this scope
    6 |                 cin >> M[i];
      |                 ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:16:25: error: 'cout' was not declared in this scope
   16 |                         cout << i << endl;
      |                         ^~~~
a.cc:16:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:38: error: 'endl' was not declared in this scope
   16 |                         cout << i << endl;
      |                                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

a = [False for i in range(31)]

for i in range(30):
    x = int(input())
    a[x] = True
for i in range(1, 30):
    if a[i] == False:
        print(i)

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a = [False for i in range(31)]
      | ^
Language: C++

#include<iostream>
using namespace std ;
int main()
{
	short num[ 30 ] ;
	short suu[ 30 ] ;
	for( short i = 0 ; i < 30 ; i++ )
	{
		cin >> num[ i ]
		for( short j = 1 ; j <= 30 ; j++ )
		{
			if( num[ i ] == j )
			{
				suu[ i ] = 0 ;
			}
		}
	}
	for( short i = 0 ; i < 30 ; i++ )
	{
		if( num[ i ] != 0 )
		{
			cout << i + 1 << endl ;
		}
	}
	return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: expected ';' before 'for'
    9 |                 cin >> num[ i ]
      |                                ^
      |                                ;
   10 |                 for( short j = 1 ; j <= 30 ; j++ )
      |                 ~~~             
a.cc:10:36: error: 'j' was not declared in this scope
   10 |                 for( short j = 1 ; j <= 30 ; j++ )
      |                                    ^
Language: C++

#include<iostream>
using namespace std ;
int main()
{
	short num[ 30 ] ;
	short suu[ 30 ] ;
	for( int i = 0 ; i < 30 ; i++ )
	{
		cin >> num[ i ]
		for( int j = 1 ; j <= 30 ; j++ )
		{
			if( num[ i ] == j )
			{
				suu[ i ] = 0 ;
			}
		}
	}
	for( int i = 0 ; i < 30 ; i++ )
	{
		if( num[ i ] != 0 )
		{
			cout << i + 1 << endl ;
		}
	}
	return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: expected ';' before 'for'
    9 |                 cin >> num[ i ]
      |                                ^
      |                                ;
   10 |                 for( int j = 1 ; j <= 30 ; j++ )
      |                 ~~~             
a.cc:10:34: error: 'j' was not declared in this scope
   10 |                 for( int j = 1 ; j <= 30 ; j++ )
      |                                  ^
Language: C++

3   
9   

1   
30   

4   
6  

5   
12   

7   
10   

9   
20   

6   
21   

10   
11   

11   
7   

12   
5   

13   
28   

14   
4   

15   
18   

16   
29   

17   
17   

18   
19   

19   
27   

20   
13   

21   
16   

22   
26   

23   
14   

24   
23   

25   
22   

26   
15   

27   
3   

28   
1   

29   
24   

30   
25   

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 3
      | ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
int main() {
	std::vector<int> vec(28);
	for (int i = 0; i < 28; ++i)std::cin >> vec[i];
	std::sort(vec.begin(), vec.end());
	for (int i = 30; i >0; --i) {
		if (num[i] != i) { std::cout << i << std::endl; i--; }
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'num' was not declared in this scope; did you mean 'enum'?
    9 |                 if (num[i] != i) { std::cout << i << std::endl; i--; }
      |                     ^~~
      |                     enum
Language: C++

#include <vector>
#include <algorithm>

using namespace std;

int main() {
  int n,h,num,count,m,sum;
  vector<int> v;

  cin >> n;
  num = 1;
  count = 0;

  for(int i = 0;i<n;++i){
    cin>>h;
    v.push_back(h);
  }

  sort(v.begin(),v.end());

  for(int e : v){
    if(e == num){
      ++num;
    }
    else {
      cout<<num<<endl
      ++num;
      ++count;

      if(e == num){
        ++num;
      }
      else {
        cout<<num<<endl;
	break;
      }
    }
    if(count == 2){
      break;
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin >> n;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <algorithm>
  +++ |+#include <iostream>
    3 | 
a.cc:26:7: error: 'cout' was not declared in this scope
   26 |       cout<<num<<endl
      |       ^~~~
a.cc:26:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:26:18: error: 'endl' was not declared in this scope
   26 |       cout<<num<<endl
      |                  ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <algorithm>
  +++ |+#include <ostream>
    3 |
Language: C++

include <stdio.h>

int main(){
  int i1[28]={};
  int i2[30] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30};
   
  for(int i = 0; i < 28; i++) scanf("%d",&i1[i]);

  for(int i:i1) for(int j:i2) if(i == j) i2[j-1] = 0;

  for(int i:i2) if(i) printf("%d\n",i);
}       

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

#include<iostream>
#include<string>
using namespace std;
int main() {
    int count[31] = { 0 }, n, i;
    for (i = 1; i <= 28; i++)
    {
        cin >> n;
        count[n] = 1;
    }
    for (i = 1; i < =30; i++)
    {
        if (count[i] == 0)
        {
            cout << i << endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected primary-expression before '=' token
   11 |     for (i = 1; i < =30; i++)
      |                     ^
Language: C++

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

int main()
{
    int stu[28];
    int stusum = 0;
    int sum = 0;
    int Nostu[2];

    for (int i = 0; i < 28; i++){
        cin >> stu[i];
        stusum += stu[i];
    }

    for (i = 1; i <= 30; i++){
        sum += i;
    }

    sort(stu, stu + 28);
    
    for (int j = 1; j <= 30; j++){
        if (stu[j] != j){
            Nostu[0] = j;
        }
    }

    int n = (sum - stusum) - j;

    cout << j << endl;
    cout << n << endl;

    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: 'i' was not declared in this scope
   17 |     for (i = 1; i <= 30; i++){
      |          ^
a.cc:29:30: error: 'j' was not declared in this scope
   29 |     int n = (sum - stusum) - j;
      |                              ^
Language: C++

#include <stdio.h>
#include <stdlib.h>

#define N 256

int who[2];

int compar(const int *val1,const int *val2){
	if(*val1<*val2){
		return -1;
	}
	else if(*val1== *val2){
		return 0;
	}
	else{
		return 1;
	}
}

void detect(const int *pnt) {
	int i = 1, j = 0;
	int count = 0;
	while (1) {
		if (i != pnt[j]) {
			who[count] = i;
			count++;
			i++;
			if (count == 2) {
				break;
			}
		}
		else {
			i++;
			j++;
		}
	}
}
int main(void) {
	int stdntID[5];
	int i,j;
	for (i = 0; i<5; i++) {
		scanf("%d", &stdntID[i]);
	}
	qsort(stdntID,5,sizeof(int),compar);
	detect(stdntID);
	printf("%d\n", who[0]);
	printf("%d\n", who[1]);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:37: error: invalid conversion from 'int (*)(const int*, const int*)' to '__compar_fn_t' {aka 'int (*)(const void*, const void*)'} [-fpermissive]
   44 |         qsort(stdntID,5,sizeof(int),compar);
      |                                     ^~~~~~
      |                                     |
      |                                     int (*)(const int*, const int*)
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/stdlib.h:36,
                 from a.cc:2:
/usr/include/stdlib.h:971:34: note:   initializing argument 4 of 'void qsort(void*, size_t, size_t, __compar_fn_t)'
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>

int who[2];

int compar(const int *val1,const int *val2){
	if(*val1<*val2){
		return -1;
	}
	else if(*val1== *val2){
		return 0;
	}
	else{
		return 1;
	}
}

void detect(const int *pnt) {
	int i = 1, j = 0;
	int count = 0;
	while (1) {
		if (i != pnt[j]) {
			who[count] = i;
			count++;
			i++;
			if (count == 2) {
				break;
			}
		}
		else {
			i++;
			j++;
		}
	}
}
int main(void) {
	int stdntID[28];
	int i,j;
	for (i = 0; i<28; i++) {
		scanf("%d", &stdntID[i]);
	}
	qsort(stdntID,5,sizeof(int),compar);
	detect(stdntID);
	printf("%d\n", who[0]);
	printf("%d\n", who[1]);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:37: error: invalid conversion from 'int (*)(const int*, const int*)' to '__compar_fn_t' {aka 'int (*)(const void*, const void*)'} [-fpermissive]
   42 |         qsort(stdntID,5,sizeof(int),compar);
      |                                     ^~~~~~
      |                                     |
      |                                     int (*)(const int*, const int*)
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/stdlib.h:36,
                 from a.cc:2:
/usr/include/stdlib.h:971:34: note:   initializing argument 4 of 'void qsort(void*, size_t, size_t, __compar_fn_t)'
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
Language: C++

<?php
    $student = array();
    for($i = 0; $i < 28; $i++)  {
        $students[] = trim(fgets(STDIN));
    }
    $all_students = range(1, 30);
    $not_submitter = array_diff($all_students, $students);
    sort($not_submitter);
    echo implode("\r\n", $not_submitter);


Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?php
      | ^
a.cc:3:5: error: expected unqualified-id before 'for'
    3 |     for($i = 0; $i < 28; $i++)  {
      |     ^~~
a.cc:3:17: error: '$i' does not name a type
    3 |     for($i = 0; $i < 28; $i++)  {
      |                 ^~
a.cc:3:26: error: '$i' does not name a type
    3 |     for($i = 0; $i < 28; $i++)  {
      |                          ^~
a.cc:6:5: error: '$all_students' does not name a type
    6 |     $all_students = range(1, 30);
      |     ^~~~~~~~~~~~~
a.cc:7:5: error: '$not_submitter' does not name a type
    7 |     $not_submitter = array_diff($all_students, $students);
      |     ^~~~~~~~~~~~~~
a.cc:8:9: error: expected constructor, destructor, or type conversion before '(' token
    8 |     sort($not_submitter);
      |         ^
a.cc:9:5: error: 'echo' does not name a type
    9 |     echo implode("\r\n", $not_submitter);
      |     ^~~~
Language: C++

#include<cstdio>

int main(){
int a[30],b;
memset(a,0,sizeof(int)*30);
for(int i=0;i<30;i++){
scanf("%d",&b);
a[b]=1;
}
for(int i=0;i<30;i++) if(a[i]==0) printf("%d\n",i);
return 0;
}

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

#include<cstdio>
#include<cstdlib>
int main(){
int a[30],b;
memset(a,0,sizeof(int)*30);
for(int i=0;i<30;i++){
scanf("%d",&b);
a[b]=1;
}
for(int i=0;i<30;i++) if(a[i]==0) printf("%d\n",i);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'memset' was not declared in this scope
    5 | memset(a,0,sizeof(int)*30);
      | ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<cstdlib>
  +++ |+#include <cstring>
    3 | int main(){
Language: C++

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

using namespace std;

int main() {
	int std[30];
	memset(std,0,sizeof(std))
	for (int i=0; i<28; i++) {
		int a; cin >> a;
		std[a] = 1;
	}
	for (int i=1; i<31; i++) {
		if (!std[i-1]) cout << i << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'memset' was not declared in this scope
    9 |         memset(std,0,sizeof(std))
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <cstdio>
  +++ |+#include <cstring>
    4 | 
a.cc:10:23: error: 'i' was not declared in this scope
   10 |         for (int i=0; i<28; i++) {
      |                       ^
Language: C++

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

using namespace std;

int main() {
	int std[30];
	memset(std,0,sizeof(std));
	for (int i=0; i<28; i++) {
		int a; cin >> a;
		std[a] = 1;
	}
	for (int i=1; i<31; i++) {
		if (!std[i-1]) cout << i << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'memset' was not declared in this scope
    9 |         memset(std,0,sizeof(std));
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <cstdio>
  +++ |+#include <cstring>
    4 |
Language: C++

#include <iostream>

int main(){
	int buf;
	bool stud[30];
	
	for(int i = 0; i < 30; i++){
		stud[i] = 0;
	}
	
	for(int i = 0; i < 28; i++){
		cin >> buf;
		stud[buf] = 1;
	}
	
	for(int i = 0; i < 30; i++){
		if(stud[i] == 0){
			cout << i << endl;
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   12 |                 cin >> buf;
      |                 ^~~
      |                 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:18:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |                         cout << i << 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:18:38: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |                         cout << i << 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()
{
bool ok[31];
memset(ok,false,sizeof(ok));
ok[0]=true;
for(int i=0;i<28;i++){
int t;
cin>>t;
ok[t]=true;
}

for(int i=0;i<30;i++)
if(!ok[i])
cout<<i<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'memset' was not declared in this scope
    7 | memset(ok,false,sizeof(ok));
      | ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

t i = 1 ; i <= 30 ; i++ ){
      if(a[i]==false)cout<<i<<endl;
    }
  }
}

Compiler output:
a.cc:1:1: error: 't' does not name a type
    1 | t i = 1 ; i <= 30 ; i++ ){
      | ^
a.cc:1:11: error: 'i' does not name a type
    1 | t i = 1 ; i <= 30 ; i++ ){
      |           ^
a.cc:1:21: error: 'i' does not name a type
    1 | t i = 1 ; i <= 30 ; i++ ){
      |                     ^
a.cc:4:3: error: expected declaration before '}' token
    4 |   }
      |   ^
a.cc:5:1: error: expected declaration before '}' token
    5 | }
      | ^
Language: C++

#include<stdio.h>
void main()
{
	int i,j;
	int lasa[28];
	int value[31];

	for(i=1;i<=30;i++)
	{
		value[i]=i;
	}

	for(i=0;i<29;i++)
	{
		scanf("%d\n",&lasa[i]);
	}

	for(i=0;i<29;i++)
	{
		for(j=1;j<31;j++)
		{
			if(lasa[i]==value[j])
			{
				value[j]=-1;
			}
		}
	}
	for(i=1;i<=30;i++)
	{
		if(value[i]>-1)
		{
			printf("%d\n",value[i]);
		}
	}

}

Compiler output:
a.cc:2:1: error: '::main' must return 'int'
    2 | void main()
      | ^~~~
Language: C++

/*
	AOJ 0510 JOI yo 2005 2006 1 Who the student yet to submit
*/

//ミスを防ぐためにまずは基本のIncludeをすべて格納する

#include<fstream>
#include<string>
#include<queue>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<vector>
#define INF (1<<21)
using namespace std;
typedef pair<int,int> P;

//ここまで基本型、多少の変更はあるけどまあいける

int main()
{
	int a[30] = {0};//全要素を０で初期化

	for (int i=0,i<30,i++){
		int n;

		cin >> n;

		a[n]=1;
	}

	int m=1;
	int yet1,yet2;

	do{

		if (a[m]>1 || a[m]<1) {
			yet1=m;
			break;
		}

		m++;
	} while(m==30);

	int n = m+1

	do{
		if (a[n]>1||a[n]<1){
			yet2=n;
			break;
		}
		
		n++;
	}while(n==30);
	
	int koukan;
	
	if (yet2>yet1){
		koukan=yet1;
		yet1=yet2;
		yet2=yet1;
	}

	cout << yet1<<endl<<yet2<<endl;

	return 0;

}
		

Compiler output:
a.cc: In function 'int main()':
a.cc:28:23: error: expected ';' before '<' token
   28 |         for (int i=0,i<30,i++){
      |                       ^
      |                       ;
a.cc:28:23: error: expected primary-expression before '<' token
a.cc:28:30: error: expected ';' before ')' token
   28 |         for (int i=0,i<30,i++){
      |                              ^
      |                              ;
a.cc:31:17: error: 'cin' was not declared in this scope
   31 |                 cin >> n;
      |                 ^~~
a.cc:17:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   16 | #include<cstdio>
  +++ |+#include <iostream>
   17 | #include<vector>
a.cc:51:9: error: expected ',' or ';' before 'do'
   51 |         do{
      |         ^~
a.cc:68:9: error: 'cout' was not declared in this scope
   68 |         cout << yet1<<endl<<yet2<<endl;
      |         ^~~~
a.cc:68:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
using namespace std;
int main(){
	int n,num[29];
		for(int i=0;i<28;i++){
			cin>>n;
			num[i]=n;
		}
	sort(num,num+28);
		for(int j=0;j<30;j++){
			if(num[j]!=j+1){
				cout<<j+1<<endl;
			}
		}
	return 0;
}

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

using namespace std;
int main(){
	int n,num[29];
		for(int i=0;i<28;i++){
			cin>>n;
			num[i]=n;
		}
	sort(num,num+28);
	int o=1;
		for(int j=1;j<29;j++){
				if(num[j-1]!=o){
					cout<<o<<endl;
					j=j-1;
				}
			o++;	
			}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:25: error: 'cin' was not declared in this scope
    5 |                         cin>>n;
      |                         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:8:9: error: 'sort' was not declared in this scope; did you mean 'short'?
    8 |         sort(num,num+28);
      |         ^~~~
      |         short
a.cc:12:41: error: 'cout' was not declared in this scope
   12 |                                         cout<<o<<endl;
      |                                         ^~~~
a.cc:12:41: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:50: error: 'endl' was not declared in this scope
   12 |                                         cout<<o<<endl;
      |                                                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C

#include <stdio.h>
int main(void){
	char a[1000];
	int i;
	gets(a);
	for(i=0;a[i]!='\0';i++){
		if('D'<=a[i]&&a[i]<='Z')a[i]-=3;
		else a[i]+=23;
	}
	puts(a);
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    5 |         gets(a);
      |         ^~~~
      |         fgets
Language: C

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

int main(){
  
  char moji[1001];
  int i,m;
  scanf("%s",moji);
  for(i=0;i<=strlen(moji);i++){
    if(moji[i]>='D'){
      moji[m]=moji[i]-3;
      printf("%c",moji[m]);
    } else{
      moji[m]=moji[i]+23;
      printf("%c",moji[i]+23);
  }
  printf("\n");
  return 0;
}

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

#include<stdio.h>
int main(){
char ch[1001];
int i=0;
scanf("%s",ch);
while(1){
if(ch[i]=='?\0'){
printf("?\n");
break;
}
if(ch[i]>='D') ch[i]-=3; else if(ch[i]=='C') ch[i]='Z'; else if(ch[i]=='B') ch[i]='Y'; else if(ch[i]=='A') Ch[i]=='X';
printf("%c",ch[i]);
i++;
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:11: warning: multi-character character constant [-Wmultichar]
    7 | if(ch[i]=='?\0'){
      |           ^~~~~
main.c:11:108: error: 'Ch' undeclared (first use in this function); did you mean 'ch'?
   11 | if(ch[i]>='D') ch[i]-=3; else if(ch[i]=='C') ch[i]='Z'; else if(ch[i]=='B') ch[i]='Y'; else if(ch[i]=='A') Ch[i]=='X';
      |                                                                                                            ^~
      |                                                                                                            ch
main.c:11:108: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
char ch[1001];
int i=0;
scanf("%s",&ch);
while(1){
if(ch[i]=='?\0'){
printf("?\n");
break;
}
if(ch[i]>='D') ch[i]-=3; else if(ch[i]=='C') ch[i]='Z'; else if(ch[i]=='B') ch[i]='Y'; else if(ch[i]=='A') Ch[i]=='X';
printf("%c",ch[i]);
i++;
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:11: warning: multi-character character constant [-Wmultichar]
    7 | if(ch[i]=='?\0'){
      |           ^~~~~
main.c:11:108: error: 'Ch' undeclared (first use in this function); did you mean 'ch'?
   11 | if(ch[i]>='D') ch[i]-=3; else if(ch[i]=='C') ch[i]='Z'; else if(ch[i]=='B') ch[i]='Y'; else if(ch[i]=='A') Ch[i]=='X';
      |                                                                                                            ^~
      |                                                                                                            ch
main.c:11:108: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
	char str[1001];
	int i;

	scanf_s("%s",str);
	for (i = 0; i < strlen(str); i++) {
		if (str[i] >= 'A' && str[i] <= 'Z') {
			str[i] = (str[i] - 'A' - 3) % 26 + 'A';
		}
	}
	printf("%s\n",str);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    8 |         scanf_s("%s",str);
      |         ^~~~~~~
      |         scanf
Language: C

  1 #include <stdio.h>
  2 
  3 int main(){
  4     char ch = 'a';
  5     int i;
  6 
  7     while(ch != '\n'){
  8         scanf("%c", &ch);
  9         ch + 3;
 10         printf("%c", ch);
 11 
 12     }
 13 
 14     printf("\n");
 15     return 0;
 16 }
~                                                                                                       
~                                                                                                       
~                                                                                                       
~                                                                                                       
~                                                           

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

  1 #include <stdio.h>
  2 
  3 int main(){
  4     char ch = 'a';
  5     int i;
  6 
  7     while(ch != '\n'){
  8         scanf("%c", &ch);
  9         ch += 3;
 10         printf("%c", ch);
 11 
 12     }
 13 
 14     printf("\n");
 15     return 0;
 16 }
~                                                                                                       
~                                                                                                       
~                                                                                                       
~                                                                                                       
~                                                           

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

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

int main(void)
{
	char code[1000];
	char decode[1000];
	int i;
	
	scanf("%[^\n]", code);
	
	i = 0;
	while (code[i] != '\0'){
		code[i] == 'A' ? decode[i] = 'X' : code[i] == 'B' ? decode[i] = 'Y' : code[i] == 'C' ? decode[i] = 'Z' : decode[i] = code[i] - 3;
	}
	
	decode[i] = '\0'; 
	
	printf("%s\n", decode);
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:14:132: error: lvalue required as left operand of assignment
   14 |                 code[i] == 'A' ? decode[i] = 'X' : code[i] == 'B' ? decode[i] = 'Y' : code[i] == 'C' ? decode[i] = 'Z' : decode[i] = code[i] - 3;
      |                                                                                                                                    ^
Language: C

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

int main(void)
{
	char code[1000];
	char decode[1000];
	int i;
	
	scanf("%s", code);
	
	i = 0;
	while (code[i] != '\0'){
		code[i] == 'A' ? decode[i] = 'X' : code[i] == 'B' ? decode[i] = 'Y' : code[i] == 'C' ? decode[i] = 'Z' : decode[i] = code[i] - 3;
	}
	
	decode[i] = '\0'; 
	
	printf("%s\n", decode);
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:14:132: error: lvalue required as left operand of assignment
   14 |                 code[i] == 'A' ? decode[i] = 'X' : code[i] == 'B' ? decode[i] = 'Y' : code[i] == 'C' ? decode[i] = 'Z' : decode[i] = code[i] - 3;
      |                                                                                                                                    ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void)
{
    int i,j,k;
    char ch[30]={0};
    scanf("%s",ch);
    k = strlen(ch);
    for(i=0;i<k;i++){
        if(ch[i] == 'A'){
            ch[i]+=23;
        }
        else if(ch[i] == 'B'){
            ch[i]+=24;
        }
        else if(ch[i] == 'C'){
            ch[i]+=25;
        }
        else {
            ch[i]-=3
        }
    }

    printf("%s",ch);

    printf("\n");


    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:21: error: expected ';' before '}' token
   20 |             ch[i]-=3
      |                     ^
      |                     ;
   21 |         }
      |         ~
Language: C

#include<stdio.h>
#include<iostream>
using namespace std;
int main(void)
{
	int a,i=0,j;
	char bet,c[1001];
	
	for (;;)
	{
		scanf("%c", &bet);
		a = bet;
		if (a == 10)
		{
			break;
		}
		c[i] = a - 3;
		if (a == 65)
		{
			a = 88;
			c[i] = a;
		}

		if (a == 66)
		{
			a = 89;
			c[i] = a;
		}

		if (a == 67)
		{
			a = 90;
			c[i] = a;
		}
		i++;
	}
	for (j = 0; j < i; j++)
	{
		printf("%c", c[j]);
	}
	printf("\n");
	return 0;
}

Compiler output:
main.c:2:9: fatal error: iostream: No such file or directory
    2 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.