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

#include <iostream>

using namespace std;
int main()
{
  int str;
  cin >> str;
  int answer = 1100 - str;
  cout << answer << endl:
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: expected ';' before ':' token
    9 |   cout << answer << endl:
      |                         ^
      |                         ;
Language: C

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

int main(){

	char n[4];
	char a;
	char b;
	char c;
	
	scanf("%s",&n);

	if(n[0]==1){
	a=9;
	}else{
	
	if(n[0]==9){
	a=1;
	}else{
	
	a=n[0];
	}}
	
	if(n[1]==1){
	b=9;
	}else
	
	if(n[1]==9){
	b=1;
	}else{
	
	b=n[1];
	}}

	if(n[3]==1){
	c=9;
	}else{
	
	if(n[3]==9){
	c=1;
	}else{
	
	c=n[3];
	}}

	printf("%c%c%c",&a,&b,&c);
}

Compiler output:
main.c:35:9: error: expected identifier or '(' before 'if'
   35 |         if(n[3]==1){
      |         ^~
main.c:37:10: error: expected identifier or '(' before 'else'
   37 |         }else{
      |          ^~~~
main.c:46:16: error: expected declaration specifiers or '...' before string constant
   46 |         printf("%c%c%c",&a,&b,&c);
      |                ^~~~~~~~
main.c:46:25: error: expected declaration specifiers or '...' before '&' token
   46 |         printf("%c%c%c",&a,&b,&c);
      |                         ^
main.c:46:28: error: expected declaration specifiers or '...' before '&' token
   46 |         printf("%c%c%c",&a,&b,&c);
      |                            ^
main.c:46:31: error: expected declaration specifiers or '...' before '&' token
   46 |         printf("%c%c%c",&a,&b,&c);
      |                               ^
main.c:47:1: error: expected identifier or '(' before '}' token
   47 | }
      | ^
Language: C++

#include<iostream> 
#include<string>
using namespace std; 
int main()
{
string s; 
cin>>s;
for(int i=0;i<s.size();i++)
{
If(s[i]=='1')
cout<<9;
else 
cout<<1;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: 'If' was not declared in this scope
   10 | If(s[i]=='1')
      | ^~
a.cc:12:1: error: 'else' without a previous 'if'
   12 | else
      | ^~~~
Language: C

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

int main()

	char n[4];
	char a[4];
	char b[4];
	char c[4];
	
	scanf("%s",&n);

	if(n[0]==1){
	a=9;
	}else{
	
	if(n[0]==9){
	a=1;
	}else{
	
	a=n[0];
	}}
	
	if(n[1]==1){
	b=9;
	}else
	
	if(n[1]==9){
	b=1;
	}else{
	
	b=n[1];
	}}

	if(n[3]==1){
	c=9;
	}else{
	
	if(n[3]==9){
	c=1;
	}else{
	
	c=n[3];
	}}

	printf("%s%s%s",&a,&b,&c);
}

Compiler output:
main.c: In function 'main':
main.c:11:9: error: expected declaration specifiers before 'scanf'
   11 |         scanf("%s",&n);
      |         ^~~~~
main.c:13:9: error: expected declaration specifiers before 'if'
   13 |         if(n[0]==1){
      |         ^~
main.c:15:10: error: expected declaration specifiers before 'else'
   15 |         }else{
      |          ^~~~
main.c:24:9: error: expected declaration specifiers before 'if'
   24 |         if(n[1]==1){
      |         ^~
main.c:26:10: error: expected declaration specifiers before 'else'
   26 |         }else
      |          ^~~~
main.c:30:10: error: expected declaration specifiers before 'else'
   30 |         }else{
      |          ^~~~
main.c:33:10: error: expected declaration specifiers before '}' token
   33 |         }}
      |          ^
main.c:35:9: error: expected declaration specifiers before 'if'
   35 |         if(n[3]==1){
      |         ^~
main.c:37:10: error: expected declaration specifiers before 'else'
   37 |         }else{
      |          ^~~~
main.c:46:9: error: expected declaration specifiers before 'printf'
   46 |         printf("%s%s%s",&a,&b,&c);
      |         ^~~~~~
main.c:47:1: error: expected declaration specifiers before '}' token
   47 | }
      | ^
main.c:9:14: error: declaration for parameter 'c' but no such parameter
    9 |         char c[4];
      |              ^
main.c:8:14: error: declaration for parameter 'b' but no such parameter
    8 |         char b[4];
      |              ^
main.c:7:14: error: declaration for parameter 'a' but no such parameter
    7 |         char a[4];
      |              ^
main.c:6:14: error: declaration for parameter 'n' but no such parameter
    6 |         char n[4];
      |              ^
main.c:48: error: expected '{' at end of input
Language: C

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

int main()

	char n[4];
	char a[4];
	char b[4];
	char c[4];
	
	scanf("%s",n);

	if(n[0]==1){
	a=9;
	}else{
	
	if(n[0]==9){
	a=1;
	}else{
	
	a=n[0];
	}}
	
	if(n[1]==1){
	b=9;
	}else
	
	if(n[1]==9){
	b=1;
	}else{
	
	b=n[1];
	}}

	if(n[3]==1){
	c=9;
	}else{
	
	if(n[3]==9){
	c=1;
	}else{
	
	c=n[3];
	}}

	printf("%s%s%s",a,b,c);
}

Compiler output:
main.c: In function 'main':
main.c:11:9: error: expected declaration specifiers before 'scanf'
   11 |         scanf("%s",n);
      |         ^~~~~
main.c:13:9: error: expected declaration specifiers before 'if'
   13 |         if(n[0]==1){
      |         ^~
main.c:15:10: error: expected declaration specifiers before 'else'
   15 |         }else{
      |          ^~~~
main.c:24:9: error: expected declaration specifiers before 'if'
   24 |         if(n[1]==1){
      |         ^~
main.c:26:10: error: expected declaration specifiers before 'else'
   26 |         }else
      |          ^~~~
main.c:30:10: error: expected declaration specifiers before 'else'
   30 |         }else{
      |          ^~~~
main.c:33:10: error: expected declaration specifiers before '}' token
   33 |         }}
      |          ^
main.c:35:9: error: expected declaration specifiers before 'if'
   35 |         if(n[3]==1){
      |         ^~
main.c:37:10: error: expected declaration specifiers before 'else'
   37 |         }else{
      |          ^~~~
main.c:46:9: error: expected declaration specifiers before 'printf'
   46 |         printf("%s%s%s",a,b,c);
      |         ^~~~~~
main.c:47:1: error: expected declaration specifiers before '}' token
   47 | }
      | ^
main.c:9:14: error: declaration for parameter 'c' but no such parameter
    9 |         char c[4];
      |              ^
main.c:8:14: error: declaration for parameter 'b' but no such parameter
    8 |         char b[4];
      |              ^
main.c:7:14: error: declaration for parameter 'a' but no such parameter
    7 |         char a[4];
      |              ^
main.c:6:14: error: declaration for parameter 'n' but no such parameter
    6 |         char n[4];
      |              ^
main.c:48: error: expected '{' at end of input
Language: C

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

int main()

	char n[4];
	char a[4];
	char b[4];
	char c[4];
	
	scanf("%s",n)

	if(n[0]==1){
	a=9
	}else{
	
	if(n[0]==9){
	a=1
	}else{
	
	a=n[0]
	}}
	
	if(n[1]==1){
	b=9
	}else
	
	if(n[1]==9){
	b=1
	}else{
	
	b=n[1]
	}}

	if(n[3]==1){
	c=9
	}else{
	
	if(n[3]==9){
	c=1
	}else{
	
	c=n[3]
	}}

	printf("%s%s%s",a,b,c)
}

Compiler output:
main.c: In function 'main':
main.c:11:9: error: expected declaration specifiers before 'scanf'
   11 |         scanf("%s",n)
      |         ^~~~~
main.c:15:10: error: expected declaration specifiers before 'else'
   15 |         }else{
      |          ^~~~
main.c:24:9: error: expected declaration specifiers before 'if'
   24 |         if(n[1]==1){
      |         ^~
main.c:26:10: error: expected declaration specifiers before 'else'
   26 |         }else
      |          ^~~~
main.c:30:10: error: expected declaration specifiers before 'else'
   30 |         }else{
      |          ^~~~
main.c:33:10: error: expected declaration specifiers before '}' token
   33 |         }}
      |          ^
main.c:35:9: error: expected declaration specifiers before 'if'
   35 |         if(n[3]==1){
      |         ^~
main.c:37:10: error: expected declaration specifiers before 'else'
   37 |         }else{
      |          ^~~~
main.c:46:9: error: expected declaration specifiers before 'printf'
   46 |         printf("%s%s%s",a,b,c)
      |         ^~~~~~
main.c:9:14: error: declaration for parameter 'c' but no such parameter
    9 |         char c[4];
      |              ^
main.c:8:14: error: declaration for parameter 'b' but no such parameter
    8 |         char b[4];
      |              ^
main.c:7:14: error: declaration for parameter 'a' but no such parameter
    7 |         char a[4];
      |              ^
main.c:6:14: error: declaration for parameter 'n' but no such parameter
    6 |         char n[4];
      |              ^
main.c:48: error: expected '{' at end of input
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <cmath>

using namespace std;

int main(){
    string n;
    cin >> n;
    replace(n.begin(), n.end(), "1", "a");
    replace(n.begin(), n.end(), "9", "z");
    replace(n.begin(), n.end(), "a", "9");
    replace(n.begin(), n.end(), "z", "1");
    cout << n;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'replace' was not declared in this scope
   12 |     replace(n.begin(), n.end(), "1", "a");
      |     ^~~~~~~
Language: C

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

int main()

	char n[4];
	char a[4];
	char b[4];
	char c[4];
	
	scanf("%s",n)

	if(n[0]==1)
	a=9
	}else
	
	if(n[0]==9)
	a=1
	}else
	
	a=n[0]
	}
	
	if(n[1]==1)
	b=9
	}else
	
	if(n[1]==9)
	b=1
	}else
	
	b=n[1]
	}

	if(n[3]==1)
	c=9
	}else
	
	if(n[3]==9)
	c=1
	}else
	
	c=n[3]
	}

	printf("%s%s%s",a,b,c)
}

Compiler output:
main.c: In function 'main':
main.c:11:9: error: expected declaration specifiers before 'scanf'
   11 |         scanf("%s",n)
      |         ^~~~~
main.c:15:10: error: expected declaration specifiers before 'else'
   15 |         }else
      |          ^~~~
main.c:19:10: error: expected declaration specifiers before 'else'
   19 |         }else
      |          ^~~~
main.c:24:9: error: expected declaration specifiers before 'if'
   24 |         if(n[1]==1)
      |         ^~
main.c:26:10: error: expected declaration specifiers before 'else'
   26 |         }else
      |          ^~~~
main.c:30:10: error: expected declaration specifiers before 'else'
   30 |         }else
      |          ^~~~
main.c:35:9: error: expected declaration specifiers before 'if'
   35 |         if(n[3]==1)
      |         ^~
main.c:37:10: error: expected declaration specifiers before 'else'
   37 |         }else
      |          ^~~~
main.c:41:10: error: expected declaration specifiers before 'else'
   41 |         }else
      |          ^~~~
main.c:46:9: error: expected declaration specifiers before 'printf'
   46 |         printf("%s%s%s",a,b,c)
      |         ^~~~~~
main.c:9:14: error: declaration for parameter 'c' but no such parameter
    9 |         char c[4];
      |              ^
main.c:8:14: error: declaration for parameter 'b' but no such parameter
    8 |         char b[4];
      |              ^
main.c:7:14: error: declaration for parameter 'a' but no such parameter
    7 |         char a[4];
      |              ^
main.c:6:14: error: declaration for parameter 'n' but no such parameter
    6 |         char n[4];
      |              ^
main.c:48: error: expected '{' at end of input
Language: C++

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

int main(){
    int n;
    cin >> n;
    int ans = 0;
    if(n / 100 == 9) {
        ans += 100;
        n -= 900 
    } else {
        ans += 900;
        n -= 100
    } 

    if(n / 10 == 9) {
        ans += 10;
        n -= 90;
    } else {
        ans += 90;
        n -= 10;
    }

    if(n == 9){
        ans++;
    } else {
        ans += 9;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before '}' token
   11 |         n -= 900
      |                 ^
      |                 ;
   12 |     } else {
      |     ~            
a.cc:14:17: error: expected ';' before '}' token
   14 |         n -= 100
      |                 ^
      |                 ;
   15 |     }
      |     ~
Language: C

#include<studio.h>
#include<string.h>

int main()

	char n[4];
	char a[4];
	char b[4];
	char c[4];
	
	scanf("%s",n)

	if(n[0]==1)
	a=9
	}else
	
	if(n[0]==9)
	a=1
	}else
	
	a=n[0]
	}
	
	if(n[1]==1)
	b=9
	}else
	
	if(n[1]==9)
	b=1
	}else
	
	b=n[1]
	}

	if(n[3]==1)
	c=9
	}else
	
	if(n[3]==9)
	c=1
	}else
	
	c=n[3]
	}

	printf("%s%s%s",a,b,c)
}

Compiler output:
main.c:1:9: fatal error: studio.h: No such file or directory
    1 | #include<studio.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
public class Atcoder{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
                int answer = 0;
		if(n/100 == 9){
			answer = 100;
			n=n-900;
		}else{
			answer = 900;
			n=n-100;
		}
		if(n/10 == 9){
			answer = answer+10;
			n=n-90;
		}else{
			answer = answer+90;
			n=n-10;
		}
		if(n == 9){
			answer = answer+1;
			
		}else{
			answer = answer+9;
		}
		System.out.println(answer);
	}
}

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

#include <stdio.h>

int main(){
	int a,i,b[3];
	scanf("%d",&a);
	for(i = 0;i < 3;i++){
	b[i] = a % 10;
	if(b[i] == 1)
		b[i] = 9;
	else if(b[i] == 9)
		b[i] = 1;
	a = a / 10;
	}
	printf("%d%d%d",b[2]b[1]b[0]);
}

Compiler output:
main.c: In function 'main':
main.c:14:29: error: expected ')' before 'b'
   14 |         printf("%d%d%d",b[2]b[1]b[0]);
      |               ~             ^
      |                             )
Language: C

#include<stdio.h>

int main(void){
    int N;
    int ans = 0;
    scanf("%d",&N);

    while(1){
    if(N >= ans){
        ans += 111;
    }
    if(N == 999){
        ans = 1111;
    }
    
    if(ans > N) break;
    }

    printf("%d",ans);

   

Compiler output:
main.c: In function 'main':
main.c:19:5: error: expected declaration or statement at end of input
   19 |     printf("%d",ans);
      |     ^~~~~~
Language: C

#include<studio.h>

int main()

	char n[4];
	char a[4];
	char b[4];
	char c[4];
	
	scanf("%s",n)

	if(n[0]==1)
	a=9
	}else
	
	if(n[0]==9)
	a=1
	}else
	
	a=n[0]
	}
	
	if(n[1]==1)
	b=9
	}else
	
	if(n[1]==9)
	b=1
	}else
	
	b=n[1]
	}

	if(n[3]==1)
	c=9
	}else
	
	if(n[3]==9)
	c=1
	}else
	
	c=n[3]
	}

	printf("%s%s%s",a,b,c)
}

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

#include <iostream>
#include <string>

using namespace std;

int main(){
    string a;
	cin>>a;
	for(i=0;i<3;i++)
	{
		a[i]=(a[i]=='1'?'9':'1');
	}
	cout<<a<<endl;
}

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<3;i++)
      |             ^
Language: C++

#include <iostream>
#include <string>

using namaspace std;

int main(){
    string a;
	cin>>a;
	for(i=0;i<3;i++)
	{
		a[i]=(a[i]=='1'?'9':'1');
	}
	cout<<a<<endl;
}

Compiler output:
a.cc:4:7: error: expected nested-name-specifier before 'namaspace'
    4 | using namaspace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string a;
      |     ^~~~~~
a.cc:7:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin>>a;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:14: error: 'a' was not declared in this scope
    8 |         cin>>a;
      |              ^
a.cc:9:13: error: 'i' was not declared in this scope
    9 |         for(i=0;i<3;i++)
      |             ^
a.cc:13:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |         cout<<a<<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:13:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |         cout<<a<<endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>

using namespace std;
int main()
{
  string s
  cin >> s;
  string a2 , b2 ,c2;
  if(s[0]== '1') a2 = '9';
  if(s[0] == '9') a2 = '1';
  if(s[1]== '1') b2 ='9';
  if(s[1]== '9') b2 = '1';
  if(s[2]== '1') c2 = '9';
  if(s[2]== '9') c2 = '1';
  cout << a2 << b2 << c2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
    7 |   cin >> s;
      |   ^~~
a.cc:9:6: error: 's' was not declared in this scope
    9 |   if(s[0]== '1') a2 = '9';
      |      ^
a.cc:10:6: error: 's' was not declared in this scope
   10 |   if(s[0] == '9') a2 = '1';
      |      ^
a.cc:11:6: error: 's' was not declared in this scope
   11 |   if(s[1]== '1') b2 ='9';
      |      ^
a.cc:12:6: error: 's' was not declared in this scope
   12 |   if(s[1]== '9') b2 = '1';
      |      ^
a.cc:13:6: error: 's' was not declared in this scope
   13 |   if(s[2]== '1') c2 = '9';
      |      ^
a.cc:14:6: error: 's' was not declared in this scope
   14 |   if(s[2]== '9') c2 = '1';
      |      ^
Language: C++

#include <iostream>
#include <string>

int main(){
    string a;
	cin>>a;
	for(i=0;i<3;i++)
	{
		a[i]=(a[i]=='1'?'9':'1');
	}
	cout<<a<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string a;
      |     ^~~~~~
a.cc:5:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin>>a;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:14: error: 'a' was not declared in this scope
    6 |         cin>>a;
      |              ^
a.cc:7:13: error: 'i' was not declared in this scope
    7 |         for(i=0;i<3;i++)
      |             ^
a.cc:11:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |         cout<<a<<endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |         cout<<a<<endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

n = list(input())

ans = ''

for i in n:
    if int(i) == 1:
        ans += '9'
    else:
        ans += '1'
print(ans)


Compiler output:
a.cc:3:7: error: empty character constant
    3 | ans = ''
      |       ^~
a.cc:1:1: error: 'n' does not name a type
    1 | n = list(input())
      | ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){
	string a;
	cin >> a;
	for(int i = 0 ; i < a.size(); i++){
		if(s[i] == '1')
			cout << '9';
		else
			cout << '1';
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: 's' was not declared in this scope
    9 |                 if(s[i] == '1')
      |                    ^
Language: C++

program main
Implicit None
integer :: n,x

	read *, n
	
	if (n > 200)then
		x = 100
		n = n-900
		else
		x = 900
		n = n-100
	endif
	
	if(n > 20)then
		x= x + 10
		n = n-90
		else
		x = x + 90
		n = n-10
	endif
	
	if(n > 2)then
		x = x + 1
		else
		x = x + 9
	endif
	
	print 101,x
	
101 format (i0)

end program main

Compiler output:
a.cc:1:1: error: 'program' does not name a type
    1 | program main
      | ^~~~~~~
Language: C++

int main()
{
	char szVal[4];
	cin >> szVal;

	int nCnt = strlen(szVal);
	for (int i = 0; i < nCnt; i++)
	{
		if (szVal[i] == '1')
			szVal[i] = '9';
		else if(szVal[i] == '9')
			szVal[i] = '1';
	}

	cout << szVal;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> szVal;
      |         ^~~
a.cc:6:20: error: 'strlen' was not declared in this scope
    6 |         int nCnt = strlen(szVal);
      |                    ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | int main()
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout << szVal;
      |         ^~~~
Language: Java

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

		double A,B,C;
		int Aa,Ba;

		A = n / 100;
		Aa = (int) Math.floor(A);
		n =- Aa;

		B = n / 10;
		Ba = (int) Math.floor(B);
		n =- Ba;

		C = n * 100;
		System.out.println(Aa + Ba + C);
		}
	}


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

import java.util.Scanner;

public class A111 {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String S = in.next();
		String s="";
		for(int i=0;i<3;i++) {
			if (S.charAt(i) == '1') {
				s=s+'9';
			}else if(S.charAt(i) == '9'){
					s=s+'1';
			}else {
				s=s+S.charAt(i);
			}
		}
		

		
		System.out.print(s);

	}
}

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

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

int main(){int n,m=0;
          cin>>n;
          if(n/100==9)
            m+=100;
         else if(n/100==1)
            m+=900;
           else
             m+=n/100*100;
          if(n/10%10==1)
            m+=90;
         else if(n/10%10==9)
            m+=10;
          else m+=n/10%10;
          if(n%10==1)
            m+=9;
          else if(n%10==9)
            m+=1;
           else
             m+=n%10;
          cout<<m;
          }

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

#include <stdio.h>
int main(){
  
    int i;
    int a[3];
  
    for(i = 0; i < 3; ++i){
        scanf("%d", &a[i])
          if(a[i] == 1){
            a[i] == 9;
          }
          else {
            a[i] == 1;
          }
    }
  
    printf("%d\n", a[1],a[2],a[3]);
  
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:27: error: expected ';' before 'if'
    8 |         scanf("%d", &a[i])
      |                           ^
      |                           ;
    9 |           if(a[i] == 1){
      |           ~~
Language: C

#include<stdio.h>

int main()
{
char moji[3];
scanf("%c%c%c,&moji[0],&moji[1],&moji[2]);

for(int i = 0;i<=2;i++)
{
if(moji[i] == '1')
{
moji[i] = '9';
}
if(moji[i] == '9')
{
moji[i] = '1';
}
}
printf("%s",moji);

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:7: warning: missing terminating " character
    6 | scanf("%c%c%c,&moji[0],&moji[1],&moji[2]);
      |       ^
main.c:6:7: error: missing terminating " character
    6 | scanf("%c%c%c,&moji[0],&moji[1],&moji[2]);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:8:1: error: expected expression before 'for'
    8 | for(int i = 0;i<=2;i++)
      | ^~~
main.c:21:10: error: expected ';' before '}' token
   21 | return 0;
      |          ^
      |          ;
   22 | }
      | ~
Language: C

#include<stdio.h>

int main()
{
char moji[3];
scanf("%c%c%c,moji[0],moji[1],moji[2]);

for(int i = 0;i<=2;i++)
{
if(moji[i] == '1')
{
moji[i] = '9';
}
if(moji[i] == '9')
{
moji[i] = '1';
}
}
printf("%s",moji);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: warning: missing terminating " character
    6 | scanf("%c%c%c,moji[0],moji[1],moji[2]);
      |       ^
main.c:6:7: error: missing terminating " character
    6 | scanf("%c%c%c,moji[0],moji[1],moji[2]);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:8:1: error: expected expression before 'for'
    8 | for(int i = 0;i<=2;i++)
      | ^~~
main.c:21:10: error: expected ';' before '}' token
   21 | return 0;
      |          ^
      |          ;
   22 | }
      | ~
Language: C

#include <stdio.h>
int main(){
  
    int i;
    int a[x];
  
    for(i = 0; i < 3; ++i){
        scanf("%d", &a[i])
          if(a[i] == 1){
            a[i] == 9;
          }
          else {
            a[i] == 1;
          }
    }
  
    printf("%d\n", a[1],a[2],a[3]);
  
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:11: error: 'x' undeclared (first use in this function)
    5 |     int a[x];
      |           ^
main.c:5:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:27: error: expected ';' before 'if'
    8 |         scanf("%d", &a[i])
      |                           ^
      |                           ;
    9 |           if(a[i] == 1){
      |           ~~
Language: C++

import sys

n = input()
ans = ""

for i in range(len(n)):
    if n[i] =='9':
        ans+='1'

    else :
        ans+='9'

print(ans)

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C

#include <stdei.h>
int main(){
  
    int i;
    int a[x];
  
    for(i = 0; i < 3; ++i){
        scanf("%d", &a[i])
          if(a[i] == 1){
            a[i] == 9;
          }
          else {
            a[i] == 1;
          }
    }
  
    printf("%d\n", a[1],a[2],a[3]);
  
return 0;
}

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

#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
using namespace std;
        int main()
        {
            string s;
            cin>>s;
            for(int i=0;i<3;i++){
                if(s[i]==1){
                s[i]=9;
                }
                if(s[i]==9){
                s[i]=1;
            }
            cout<<s;
        }

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

    	#include<iostream>
        #include<string>
        #include<algorithm>
        #include<map>
        #include<vector>
        using namespace std;
        int main()
        {
            string s;
            cin>>s;
            for(int i=0;i<3;i++){
                if(s[i]=='1'){
                s[i]=9;
                }
                if(s[i]=='9'){
                s[i]=1;
            }
            cout<<s;
        }

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

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

int main(){
  char n[10000];
  cin >> n;
  for(int i = 0;i < strlen(n);i++){
    if(n[i] == '1'){
      cout << 9 ;
    }
    else{
      cout << 1;
    }
  }
  cout << endl;
  return 0;
}


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

/**
  * @file pa.cpp
  * @brief atcoder

  *

  * @author yao
  * @date 2018-09-29
  */
#include <cstdlib>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <utility>
#include <algorithm>
#include <functional>
#define N 1048576
#define INF ((int)1e9)
#ifdef DBG
#   define dbg_pri(x...) fprintf(stderr,x)
#else
#   define dbg_pri(x...) 0
#endif //DBG

typedef unsigned int uint;
typedef long long int lli;
typedef unsigned long long int ulli;

char s[N];

int main()
{
    strtok(fgets(s,N,stdin));
    for(char *p=s;*p;++p)*p^='1'^'9';
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:11: error: too few arguments to function 'char* strtok(char*, const char*)'
   33 |     strtok(fgets(s,N,stdin));
      |     ~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:13:
/usr/include/string.h:356:14: note: declared here
  356 | extern char *strtok (char *__restrict __s, const char *__restrict __delim)
      |              ^~~~~~
Language: C++

#include<algorithm>
    #include<map>
    #include<vector>
    using namespace std;
    int main()
    {
        int a[3];
        for(int i=0;i<3;i++) cin>>a[i];
        for(int i=0;i<3;i++){
            if(a[i]=='1'){
            a[i]=9;
            }
            if(a[i]=='9'){
            a[i]=1;
            }
        }
        for(int i=0;i<3;i++){
            cout<<a[i];
        }
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: 'cin' was not declared in this scope
    8 |         for(int i=0;i<3;i++) cin>>a[i];
      |                              ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 |     #include<vector>
  +++ |+#include <iostream>
    4 |     using namespace std;
a.cc:18:13: error: 'cout' was not declared in this scope
   18 |             cout<<a[i];
      |             ^~~~
a.cc:18:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
#include <string>

int main() {
  string n;
  cin >> n;
  
  for (int i = 0; i < 3; ++i) {
    switch(s[i]) {
      case '1':
        cout << '9';
      case '9':
        cout << '1':
    }
  }
    
  cout << "\n";
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string n;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> n;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:10: error: 'n' was not declared in this scope
    6 |   cin >> n;
      |          ^
a.cc:9:12: error: 's' was not declared in this scope
    9 |     switch(s[i]) {
      |            ^
a.cc:11:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |         cout << '9';
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |   cout << "\n";
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String S = in.next();
		String s="";
		for(int i=0;i<3;i++) {
			if (S.charAt(i) == '1') {
				s=s+'9';
			}else if(S.charAt(i) == '9'){
					s=s+'1';
			}else {
				s=s+S.charAt(i);
			}
		}
		

		
		System.out.print(s);

	}
}


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

#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm> 
#include<string>
using namespace std;
int n;
string st;

int main(){
   cin >> n;
   cin >> st;
   for(int i=1; i<=n; i++){
     for(int j=0; j<=st.size()-1; j++){
        if(st[j]=="1") st[j]="9";
        if(st[j]=="9") st[j]="1";
	 }
   }
   cout << st;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |         if(st[j]=="1") st[j]="9";
a.cc:15:30: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   15 |         if(st[j]=="1") st[j]="9";
      |                              ^~~
      |                              |
      |                              const char*
a.cc:16:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |         if(st[j]=="9") st[j]="1";
a.cc:16:30: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   16 |         if(st[j]=="9") st[j]="1";
      |                              ^~~
      |                              |
      |                              const char*
Language: C++

#include <iostream>
using namespace std;

int main() {
  int n;
  cin >> n;
  cout << 1110 - n << "\n";
  return 0;

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

str1 = raw_input().replace("\n", "")
str2 = str1.replace("1", "A").replace("9", "B")
str3 = str2.replace("A", "9").replace("B", "1")
print str3

Compiler output:
a.cc:1:1: error: 'str1' does not name a type
    1 | str1 = raw_input().replace("\n", "")
      | ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int a;
	cin>>;
	if(a==111){
		cout<<999<<endl;
	}
	else if(a==119){
		cout<<991<<endl;
	}
	else if(a==191){
		cout<<919<<endl;
	}
	else if(a==199){
		cout<<911<<endl;
	}
	else if(a==911){
		cout<<199<<endl;
	}
	else if(a==919){
		cout<<191<<endl;
	}
	else if(a==991){
		cout<<119<<endl;
	}
	else{
		cout<<111<<endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: expected primary-expression before ';' token
    5 |         cin>>;
      |              ^
Language: C++

#include<string>
    #include<algorithm>
    #include<map>
    #include<vector>
    using namespace std;
    int main()
    {
        string s;
        cin>>s;
        for(int i=0;i<3;i++){
            if(s[i]=='1'){
            s[i]=9;
            }
            if(s[i]=='9'){
            s[i]=1;
            }
        }
        cout<<s;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         cin>>s;
      |         ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 |     #include<vector>
  +++ |+#include <iostream>
    5 |     using namespace std;
a.cc:18:9: error: 'cout' was not declared in this scope
   18 |         cout<<s;
      |         ^~~~
a.cc:18:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>

int main(void)
{
  char n[4];
  scanf("%s", &n[0]);
  for (int i=0; i<3; i++) {
    cout << n[i]=='1'?'9':n[i]=='9'?'1':n[i];
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout << n[i]=='1'?'9':n[i]=='9'?'1':n[i];
      |     ^~~~
      |     std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

#include <stdio.h>

int main(void) {
    char s;
    int i;
    scanf("%s",s);
    for (i = 0;i < 3;i++) {
        if (s[i] == '1') s[i] = '9';
        if (s[i] == '9') s[i] = '1';
    }
    printf("%s\n",s);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:14: error: subscripted value is neither array nor pointer nor vector
    8 |         if (s[i] == '1') s[i] = '9';
      |              ^
main.c:8:27: error: subscripted value is neither array nor pointer nor vector
    8 |         if (s[i] == '1') s[i] = '9';
      |                           ^
main.c:9:14: error: subscripted value is neither array nor pointer nor vector
    9 |         if (s[i] == '9') s[i] = '1';
      |              ^
main.c:9:27: error: subscripted value is neither array nor pointer nor vector
    9 |         if (s[i] == '9') s[i] = '1';
      |                           ^
Language: C++

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

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

  for (int i = 0; i < 3; i++){
    if (S[i] == '1')
      S[i] = "9";
    else
      S[i] = "1";
  }

  cout << S;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   13 |       S[i] = "9";
      |              ^~~
      |              |
      |              const char*
a.cc:15:14: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   15 |       S[i] = "1";
      |              ^~~
      |              |
      |              const char*
Language: C++

#include<iostream>
#include<string>

int main(){
  
  string s;
  cin >> s;
  for(int i=0;i<s.size();++i){
    if(s[i]=='1') s[i]='9';
    else if(s[i]=='9')s[i] ='1';
  }
  cout << s;
}

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

#include<iostream>
    #include<string>
    #include<algorithm>
    #include<map>
    #include<vector>
    using namespace std;
    int main()
    {
        string s;
        cin>>s;
        for(int i=0;i<3;i++){
            if(s[i]=='1'){
            s[i]=9;
            }
            if(s[i]=='9'){
            s[i]=1;
        }
        cout<<s;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:19:6: error: expected '}' at end of input
   19 |     }
      |      ^
a.cc:8:5: note: to match this '{'
    8 |     {
      |     ^
Language: C++

n=gets.chomp.to_s

for i in 0..2 do
  if n[i] == "1"
    n[i] = "9"
  else
    n[i] = "1"
  end
end

puts n

Compiler output:
a.cc:3:10: error: too many decimal points in number
    3 | for i in 0..2 do
      |          ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n=gets.chomp.to_s
      | ^
Language: C++

import java.util.Scanner;

public class Main implements Runnable {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        new Thread(null, new Main(), "", 128 * 1024 * 1024).start();
    }

    public void run() {
        String s = sc.next();
        String n = "";
        for (int i = 0; i < 3; i++) {
            n += s.charAt(i) == '9' ? '1' : '9';
        }
        System.out.println(n);
    }
}

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

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

#define CH ch = getchar();

template <class T> inline void read(T &x) {
	x = 0; int ch, f = 0;
	for (CH; ch < '0' || ch > '9'; CH) if (ch == '-') f = 1;
	for (; ch >= '0' && ch <= '9'; CH) x = (x << 1) + (x << 3) + (ch ^ 48);
	if (f) x = -x;
}

int main() {
	char x;
	while (~scanf("%c", &x)) {
		if (x == '9') printf("1");
		else if (x == '1') printf("9");
	}
}

Compiler output:
a.cc: In function 'void read(T&)':
a.cc:8:38: error: expected ')' before ';' token
    8 |         for (CH; ch < '0' || ch > '9'; CH) if (ch == '-') f = 1;
      |             ~                        ^
      |                                      )
a.cc:8:42: error: expected primary-expression before ')' token
    8 |         for (CH; ch < '0' || ch > '9'; CH) if (ch == '-') f = 1;
      |                                          ^
a.cc:4:26: error: expected ')' before ';' token
    4 | #define CH ch = getchar();
      |                          ^
a.cc:9:40: note: in expansion of macro 'CH'
    9 |         for (; ch >= '0' && ch <= '9'; CH) x = (x << 1) + (x << 3) + (ch ^ 48);
      |                                        ^~
a.cc:9:13: note: to match this '('
    9 |         for (; ch >= '0' && ch <= '9'; CH) x = (x << 1) + (x << 3) + (ch ^ 48);
      |             ^
a.cc:9:42: error: expected primary-expression before ')' token
    9 |         for (; ch >= '0' && ch <= '9'; CH) x = (x << 1) + (x << 3) + (ch ^ 48);
      |                                          ^
Language: C++

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

int main() {
	string s;
	cin>>s;
	for(int i=0;i<n;i++)
	  {
	  	 if(s[i]=='1')
	  	   s[i]='9';
	  	 if(s[i]=='9')
	  	   s[i]='1';
	  }
	 cout<<s; 
	// your code goes here
	return 0;
}

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

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

typedef long long ll;

int main() {
	string a,b;
	cin >> a;
	b = a;
	for (int i = 0;i < a.size();i++) {
		if (a[i] == '1') {
			b[i] = '9;'
		} else {
			b[i] = '1'
		}
	}
	cout << b << endl;
}

Compiler output:
a.cc:12:32: warning: multi-character character constant [-Wmultichar]
   12 |                         b[i] = '9;'
      |                                ^~~~
a.cc: In function 'int main()':
a.cc:12:32: warning: overflow in conversion from 'int' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} changes value from '14651' to '59' [-Woverflow]
a.cc:12:36: error: expected ';' before '}' token
   12 |                         b[i] = '9;'
      |                                    ^
      |                                    ;
   13 |                 } else {
      |                 ~                   
a.cc:14:35: error: expected ';' before '}' token
   14 |                         b[i] = '1'
      |                                   ^
      |                                   ;
   15 |                 }
      |                 ~
Language: C++

int main()
{
	string n;
	cin >> n;
	for (int i = 0; i < 3; i++) {
		if (n[i] == '1')n[i] = '9';
		if (n[i] == '9')n[i] = '1';
	}

	cout << stoi(n) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'string' was not declared in this scope
    3 |         string n;
      |         ^~~~~~
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> n;
      |         ^~~
a.cc:4:16: error: 'n' was not declared in this scope
    4 |         cin >> n;
      |                ^
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout << stoi(n) << endl;
      |         ^~~~
a.cc:10:17: error: 'stoi' was not declared in this scope
   10 |         cout << stoi(n) << endl;
      |                 ^~~~
a.cc:10:28: error: 'endl' was not declared in this scope
   10 |         cout << stoi(n) << endl;
      |                            ^~~~