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

#include <iostream>
#include <string>
#include <cstring>
using namespace std;
int main(void){
  string number;
  cin >> number;
  
  for(int i=0;i<strlen(number);i++){
    if(number[i] == '1')
      number[i] = '9';
    else if(number[i] == '9')
      number[i] = '1';
  }
  
  cout << number << endl;
  
  return 0;
}
#include <iostream>
#include <string>
using namespace std;
int main(void){
  string number;
  cin >> number;
  
  for(int i=0;i<strlen(number);i++){
    if(number[i] == '1')
      number[i] = '9';
    else if(number[i] == '9')
      number[i] = '1';
  }
  
  cout << number << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    9 |   for(int i=0;i<strlen(number);i++){
      |                        ^~~~~~
      |                        |
      |                        std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:3:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc: At global scope:
a.cc:23:5: error: redefinition of 'int main()'
   23 | int main(void){
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main(void){
      |     ^~~~
a.cc: In function 'int main()':
a.cc:27:24: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   27 |   for(int i=0;i<strlen(number);i++){
      |                        ^~~~~~
      |                        |
      |                        std::string {aka std::__cxx11::basic_string<char>}
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(void){
  string number;
  cin >> number;
  
  for(int i=0;i<strlen(number);i++){
    if(number[i] == '1')
      number[i] = '9';
    else if(number[i] == '9')
      number[i] = '1';
  }
  
  cout << number << endl;
  
  return 0;
}

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

#include <iostream>
#include <string>
using namespace std;
int main(void){
  string number;
  cin >> string;
  
  for(int i=0;i<strlen(number);i++){
    if(number[i] == '1')
      number[i] = '9';
    else if(number[i] == '9')
      number[i] = '1';
  }
  
  cout << number << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected primary-expression before ';' token
    6 |   cin >> string;
      |                ^
a.cc:8:17: error: 'strlen' was not declared in this scope
    8 |   for(int i=0;i<strlen(number);i++){
      |                 ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

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

int main(){
  string S;
  cin>>S;
  for(int i=0;i<3;i++){
    if(S.at(i)=='0')
      S.at(i)='9';
    else
      S.at(i)='1'
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before '}' token
   11 |       S.at(i)='1'
      |                  ^
      |                  ;
   12 |   }
      |   ~
Language: C++

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

int main(){
  string S;
  cin>>S;
  for(int i=0;i<3;i++){
    if(S.at(i)=='0')
      S.at(i)='9';
    else
      S.at(i)='1'
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before '}' token
   11 |       S.at(i)='1'
      |                  ^
      |                  ;
   12 |   }
      |   ~               
a.cc:12:4: error: expected '}' at end of input
   12 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
char a,b,c;
cin >> a >> b >>c;
if (a=="1")
{
cout << 9;
}else{
  cout << 1;
}
if (b=="1")
{
cout << 9;
}else{
  cout << 1;
}
if (c=="1")
{
cout << 9 << endl;;
}else{
  cout << 1 << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 | if (a=="1")
      |     ~^~~~~
a.cc:13:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 | if (b=="1")
      |     ~^~~~~
a.cc:19:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 | if (c=="1")
      |     ~^~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <tuple>
using namespace std;
 
 
int main() {
    
    string S;
    cin >> S;
    
    int ans = 0;
    int n = S.size();
    for (int i = 0; i < n; i++) {
        int tmp;
        if (S[i] == '1') tmp = 9;
        else             tmp = 1;
        ans += tmp*pow(10,n-1-i);
    }
    cout << ans << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:20: error: 'pow' was not declared in this scope
   19 |         ans += tmp*pow(10,n-1-i);
      |                    ^~~
Language: C++

#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <string>
#include <typeinfo>
#include <vector>
//#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<vector<bool>> vvb;
typedef vector<vector<int>> vvi;

#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)

int main()
{
  string s;
  cin >> s;
  rep(i,s.size()){
    if(s.at(i)=='1'){
      s.at(i) = '9';
    }else{
      s.at(i) = '1';
    }
  }
  cout << s << endl;./a.out
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:21: error: expected primary-expression before '.' token
   33 |   cout << s << endl;./a.out
      |                     ^
a.cc:33:22: error: expected unqualified-id before '/' token
   33 |   cout << s << endl;./a.out
      |                      ^
a.cc:33:23: error: 'a' was not declared in this scope
   33 |   cout << s << endl;./a.out
      |                       ^
Language: Java

package test;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class ITschool {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = 0;
		String s="";
		try {
			s = br.readLine();
			//n = Integer.parseInt(br.readLine());
		} catch (NumberFormatException | IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}
		String[] str = new String[3];
		str = s.split("");
		//System.out.println(str[0]);
		List<Integer> ret = new ArrayList<Integer>();

		for(int j = 0; j<3;j++){
			if(str[j].equals("1"))ret.add(9);
			else ret.add(1);
		}

		int ans = Integer.parseInt(str[2] + str[1] + str[0]);
		System.out.println(ans);



	}
}

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

#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<type_traits>
#include<math.h>
using namespace std;
typedef long long ll;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define repi(i,a,b) for(int i = (int)(a); i < (int)(b); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

string S;

int main(){
    cin>>S;
    rep(i,3){
        if(S[i]=='1'){
            S[i]='9';
        }
        else{
            S[i]='1';
        }
    }
    out(S);


Compiler output:
a.cc: In function 'int main()':
a.cc:34:12: error: expected '}' at end of input
   34 |     out(S);
      |            ^
a.cc:24:11: note: to match this '{'
   24 | int main(){
      |           ^
Language: C++

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

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

 cout << A endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before '}' token
   10 |     A[i] ='9'
      |              ^
      |              ;
   11 |    }
      |    ~          
a.cc:13:14: error: expected ';' before '}' token
   13 |     A[i] ='1'
      |              ^
      |              ;
   14 |    }
      |    ~          
a.cc:17:11: error: expected ';' before 'endl'
   17 |  cout << A endl;
      |           ^~~~~
      |           ;
Language: C++

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

int main(){
    string num;
    cin >> num;
    for (int i=0; i < 3; i++){
        if (num.at(i) == "9"){
            num.at(i) == "1";
        }
        else if (num.at(i) == "1"){
            num.at(i) == "9";
        }
    }

    for (int i=0; i<3; i++){
        cout << num.at(i);
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if (num.at(i) == "9"){
      |             ~~~~~~~~~~^~~~~~
a.cc:9:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |             num.at(i) == "1";
      |             ~~~~~~~~~~^~~~~~
a.cc:11:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         else if (num.at(i) == "1"){
      |                  ~~~~~~~~~~^~~~~~
a.cc:12:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |             num.at(i) == "9";
      |             ~~~~~~~~~~^~~~~~
Language: C++

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

int main(){
    string num;
    cin >> num;
    for (int i=0; i<3; i++){
        if (num.at(i) == 9){
            num.at(i) == "1";
        }
        else if (num.at(i) == 1){
            num.at(i) == "9";
        }
    }

    for (int i=0; i<3; i++){
        cout << num(i);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |             num.at(i) == "1";
      |             ~~~~~~~~~~^~~~~~
a.cc:12:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |             num.at(i) == "9";
      |             ~~~~~~~~~~^~~~~~
a.cc:17:20: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   17 |         cout << num(i);
      |                 ~~~^~~
Language: C++

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

int main(){
    string num;
    cin >> num;
    for (int i=0; i<3; i++){
        if (num.at(i) == 9){
            num.at(i) = "1";
        }
        else if (num.at(i) == 1){
            num.at(i) = "9";
        }
    }

    for (int i=0; i<3; i++){
        cout << num(i);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |             num.at(i) = "1";
      |                         ^~~
      |                         |
      |                         const char*
a.cc:12:25: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   12 |             num.at(i) = "9";
      |                         ^~~
      |                         |
      |                         const char*
a.cc:17:20: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   17 |         cout << num(i);
      |                 ~~~^~~
Language: C++

using namespace std;
int main(){
    string num;
    cin >> num;
    for (int i=0; i<3; i++){
        if (num.at(i) == 9){
            num.at(i) = "1";
        }
        else if (num.at(i) == 1){
            num.at(i) = "9";
        }
    }

    for (int i=0; i<3; i++){
        cout << num(i);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'string' was not declared in this scope
    3 |     string num;
      |     ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> num;
      |     ^~~
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:4:12: error: 'num' was not declared in this scope; did you mean 'enum'?
    4 |     cin >> num;
      |            ^~~
      |            enum
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout << num(i);
      |         ^~~~
a.cc:15:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    string num;
    cin >> num;
    for (int i=0; i<3; i++)[
        if (num.at(i) == 9){
            num.at(i) = 1;
        }
        else if (num.at(i) == 1){
            num.at(i) = 9;
        }
    ]

    for (int i=0; i<3; i++){
        cout << num(i);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected identifier before 'if'
    7 |         if (num.at(i) == 9){
      |         ^~
a.cc: In lambda function:
a.cc:15:5: error: expected '{' before 'for'
   15 |     for (int i=0; i<3; i++){
      |     ^~~
a.cc: In function 'int main()':
a.cc:13:6: error: expected ';' before 'for'
   13 |     ]
      |      ^
      |      ;
   14 | 
   15 |     for (int i=0; i<3; i++){
      |     ~~~
a.cc:15:19: error: 'i' was not declared in this scope
   15 |     for (int i=0; i<3; i++){
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    string num;
    cin >> num;
    for (int i=0; i<3; i++)[
        if (num.at(i) == 9){
            num.at(i) = 1;
        }
        if (num.at(i) == 1){
            num.at(i) = 9;
        }
    ]
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected identifier before 'if'
    7 |         if (num.at(i) == 9){
      |         ^~
a.cc: In lambda function:
a.cc:14:1: error: expected '{' before '}' token
   14 | }
      | ^
a.cc: In function 'int main()':
a.cc:13:6: error: expected ';' before '}' token
   13 |     ]
      |      ^
      |      ;
   14 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  coun << 1110-n << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'coun' was not declared in this scope
    6 |   coun << 1110-n << endl;
      |   ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
typedef long long unsigned int ll;
 
int main() {
 
  string a,b,c;
  cin >> a;
  
  for(int i=0;i<3;i++){

  if(a[i]=='1'){
    a[i]='9';
  }else if(a[i]=='9'){
	a[i]='1';
  }
  
    cout <<a <<endl;
   return 0;
}


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

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
typedef long long unsigned int ll;
 
int main() {
 
  string a,b,c;
  cin >> a;
  
  for(int i=0;i<3;i++){

  if(a[i]=='1'){
    a[i]=='9';
  }else if(a[i]=='9'){
	a[i]=='1'
  }
  
    cout <<a <<endl;
   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: expected ';' before '}' token
   18 |         a[i]=='1'
      |                  ^
      |                  ;
   19 |   }
      |   ~               
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:8:12: note: to match this '{'
    8 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int s;
  cin >> s;
  int ans = 0;
  for(int i = 0;i < 3;i++){
    if(s % pow(10,i) == 1)ans += 9*pow(10,i);
    else ans += pow(10,i);
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
    8 |     if(s % pow(10,i) == 1)ans += 9*pow(10,i);
      |        ~ ^ ~~~~~~~~~
      |        |      |
      |        int    __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

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

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

int main(){
  int n;
  cin >> n;
  
  for(int i=0;i<3;i++){
    if(n[i]==1){
      n[i]+=8;
    }else{
      n[i]-=8;
    }
  }
  cout << n;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: invalid types 'int[int]' for array subscript
    9 |     if(n[i]==1){
      |         ^
a.cc:10:8: error: invalid types 'int[int]' for array subscript
   10 |       n[i]+=8;
      |        ^
a.cc:12:8: error: invalid types 'int[int]' for array subscript
   12 |       n[i]-=8;
      |        ^
Language: C++

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

int main(void){
    string n;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected ';' before '}' token
   12 |             n[i]='1'
      |                     ^
      |                     ;
   13 |     }
      |     ~
Language: C++

#include <iostream>
using namespace std;
int main(){
  string n;
  cin >> n;
  string::itrator itr = n.begin();
  for(int i=0;i<3;i++){
    if(*(itr+i)=='1')cout << 9;
    else cout<< 1;
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'itrator' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'}
    6 |   string::itrator itr = n.begin();
      |           ^~~~~~~
a.cc:8:10: error: 'itr' was not declared in this scope
    8 |     if(*(itr+i)=='1')cout << 9;
      |          ^~~
Language: C++

#include <iostream>

int main(){
  string n;
  cin >> n;
  string::itrator itr = n.begin();
  for(int i=0;i<3;i++){
    if(*(itr+i)=='1')cout << 9;
    else cout<< 1;
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string n;
      |   ^~~~~~
a.cc:4: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:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   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:5:10: error: 'n' was not declared in this scope
    5 |   cin >> n;
      |          ^
a.cc:6:3: error: 'string' is not a class, namespace, or enumeration
    6 |   string::itrator itr = n.begin();
      |   ^~~~~~
a.cc:8:10: error: 'itr' was not declared in this scope
    8 |     if(*(itr+i)=='1')cout << 9;
      |          ^~~
a.cc:8:22: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     if(*(itr+i)=='1')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:9:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     else cout<< 1;
      |          ^~~~
      |          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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:11: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   cout << endl;
      |           ^~~~
      |           std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
  int n;
  int ans =0;
  cin >> n;
  
    if(n>=200){
      ans += 100;
      n -= 900;
    else{
      ans += 900;
      n -= 100;
    }
    if(n>=20){
      ans += 10;
      n -= 90;
    }
    else{
      ans += 90;
      n -= 10;
    }
     if(n>=2){
       ans +=1;
     }
     else{
       ans +=9;
     }
      cout << ans <<endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected '}' before 'else'
   12 |     else{
      |     ^~~~
a.cc:9:15: note: to match this '{'
    9 |     if(n>=200){
      |               ^
Language: C++

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


char[] s = new char[3]

int main() { 
  scanf("%s", &s[0]);
  for (int i = 0; i < strlen(s); i++) {
    if (s[i] == '9') {
      cout << '1';
    } else {
      cout << '9';
    }
  }
  return 0;
} 

Compiler output:
a.cc:5:5: error: structured binding declaration cannot have type 'char'
    5 | char[] s = new char[3]
      |     ^~
a.cc:5:5: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:5:5: error: empty structured binding declaration
a.cc:5:8: error: expected initializer before 's'
    5 | char[] s = new char[3]
      |        ^
Language: C++

n = str(input())
one_idx = []
nine_idx = []
for idx in range(n):
	if n[idx]=='1':
		one_idx.append(idx)
    if n[idx]=='9':
		nine_idx.append(idx)

for idx in range(n):
	if idx in one_idx:
		n[idx] = '9'
    if idx in nine_idx:
		n[idx] = '1'
          
print(n)


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = str(input())
      | ^
Language: C++

#include <cstdio>

int main()
{
  char buf[4];
  for (int i = 0; i < 3; i++) {
    buf[i] = getc();
  }
  buf[3] = '\0';
  puts(buf);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: too few arguments to function 'int getc(FILE*)'
    7 |     buf[i] = getc();
      |              ~~~~^~
In file included from /usr/include/c++/14/cstdio:42,
                 from a.cc:1:
/usr/include/stdio.h:576:12: note: declared here
  576 | extern int getc (FILE *__stream) __nonnull ((1));
      |            ^~~~
Language: C++

#include <cstdin>

int main()
{
  char buf[4];
  for (int i = 0; i < 3; i++) {
    buf[i] = getc();
  }
  buf[3] = '\0';
  puts(buf);
}


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

#include<iostream>
#include<string>

using namespace std;
int main(){
  string n;
  cin >> n;
  for(int i = 0; i < 2; ++i){
    if( n[i] == "1") n[i] = "9";
    else n[i] = "1";
  }
  
  cout << n << endl;
    return 0;
}

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

#include <bits/stdc++.h>

using namespace std;
using llong = long long;
using P = pair<llong, llong>;

#define BE(x) x.begin(), x.end()

const llong inf = llong(1e18)+7;
const llong mod = 1e9+7;

int main(){
	strint s;
	cin >> s;
	for(auto x : s)
		if(x == '1')
			cout << 9;
		else
			cout << 1;
	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'strint' was not declared in this scope; did you mean 'strcat'?
   13 |         strint s;
      |         ^~~~~~
      |         strcat
a.cc:14:16: error: 's' was not declared in this scope
   14 |         cin >> s;
      |                ^
Language: C++

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

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

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

#include <iostram>
#include <sstream>

int main(){
    std::string str;
    std::cin >> str;

    for(int i = 0; i < 3; ++i){
        if(1 == str.at(i)){
            str.at(i) = 9;
        }else{
            str.at(i) = 1;
        }
    }

    std::stringstream ss;
    ss << str;

    int ans;
    ss >> ans;

    std::cout << ans << std::endl;

    return 0;
}

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

/**
 * Created at 7:17 on 2019/03/07
 */

import java.io.*;
import java.util.*;

public class ABC111A {

  static FastScanner sc = new FastScanner();

  public static void main(String[] args) {

    int N = sc.nextInt();

    System.out.println(1110 - N);

  }

  static class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;

    private boolean hasNextByte() {
      if (ptr < buflen) {
        return true;
      } else {
        ptr = 0;
        try {
          buflen = in.read(buffer);
        } catch (IOException e) {
          e.printStackTrace();
        }
        if (buflen <= 0) {
          return false;
        }
      }
      return true;
    }

    private int readByte() {
      if (hasNextByte()) return buffer[ptr++];
      else return -1;
    }

    private static boolean isPrintableChar(int c) {
      return 33 <= c && c <= 126;
    }

    private void skipUnprintable() {
      while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
    }

    public boolean hasNext() {
      skipUnprintable();
      return hasNextByte();
    }

    public String next() {
      if (!hasNext()) throw new NoSuchElementException();
      StringBuilder sb = new StringBuilder();
      int b = readByte();
      while (isPrintableChar(b)) {
        sb.appendCodePoint(b);
        b = readByte();
      }
      return sb.toString();
    }

    public long nextLong() {
      if (!hasNext()) throw new NoSuchElementException();
      long n = 0;
      boolean minus = false;
      int b = readByte();
      if (b == '-') {
        minus = true;
        b = readByte();
      }
      if (b < '0' || '9' < b) {
        throw new NumberFormatException();
      }
      while (true) {
        if ('0' <= b && b <= '9') {
          n *= 10;
          n += b - '0';
        } else if (b == -1 || !isPrintableChar(b)) {
          return minus ? -n : n;
        } else {
          throw new NumberFormatException();
        }
        b = readByte();
      }
    }

    public int nextInt() {
      return (int) nextLong();
    }
  }

}


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

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

int main(){
  string n;
  cin >> n;
  for(int i = 0;i < 3 ;i++){
    if(n[i] == "1") cout << "9";
    else{
      cout << "1";
    }
  }
  cout << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if(n[i] == "1") cout << "9";
Language: C++

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

int main(){
  string n;
  cin >> n;
  for(int i = 0;i < 3 ;i++){
    if(n[i] == "1") cout << "9";
    else{
      cout << "1"
    }
  }
  cout << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if(n[i] == "1") cout << "9";
a.cc:11:18: error: expected ';' before '}' token
   11 |       cout << "1"
      |                  ^
      |                  ;
   12 |     }
      |     ~
Language: C++

#include <iostream>
using namespace std;
int main() {
  int N,h,j,i;
  cin >> N;
  h = N/100;
  J = (N/10)%10;
  i = (N%100)%10;
  if (h==9)
    h = 1;
  if (j==9)
    j = 1;
  if (i==9)
    i = 1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'J' was not declared in this scope
    7 |   J = (N/10)%10;
      |   ^
Language: C

#include <stdio.h>
int main(void){
char a[10];
  scanf("%s",&char);
  if(a[0]=='9'){a[0]='1';}
    if(a[1]=='9'){a[1]='1';}
    if(a[2]=='9'){a[2]='1';}
  printf("%s",char);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:4:15: error: expected expression before 'char'
    4 |   scanf("%s",&char);
      |               ^~~~
main.c:8:15: error: expected expression before 'char'
    8 |   printf("%s",char);
      |               ^~~~
Language: C++

//ABC111 A-ATCODER BEGINNER CONTEST 999
#include<bits/stdc++.h>
using namespace std;
int main(){
    string N;cin >> N;
    for(int i = 0 ;i < N.size();i++){
        if(N_at(0) == '9'){
            cout << 1;
        }
        else{
            cout << 9;
        }
    }
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'N_at' was not declared in this scope
    7 |         if(N_at(0) == '9'){
      |            ^~~~
Language: C++


N=[]

while True:

    
    for i in range(1,4):
        print("1から9の任意の自然数を入力せよ。また処理を終了する場合はqを入力せよ。")
        n=input(i)
        
        if n=="q":
            break
        
        if n=="1":
            N.append("9")
        elif n=="9":
            N.append("1")
        else:
            N.append(n)

    print("".join(N))

    N=[]

    if n=="q":
        break

    


Compiler output:
a.cc:2:1: error: 'N' does not name a type
    2 | N=[]
      | ^
Language: Java

public class AtCoderBeginner111 {
  public static void main(String[] args) {
    if (args == null) {
      return;
    }
    System.out.println(args[0].replace("1", "A").replace("9", "1").replace("A", "9"));
  }
}


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

public class AtCoderBeginner111 {
  public static void main(String[] args) {
    if (args == null) {
      return;
    }
    System.out.println(args[0].replace("1", "A").replace("9", "1").replace("A", "9"));
  }
}

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

public class AtCoderBeginner111 {
  public static void main(String[] args) {
    System.out.println(args[0].replace("1", "A").replace("9", "1").replace("A", "9"));
  }
}

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

#include <iostream> 
#include <iomanip> 
#include <vector> 
#include <algorithm> 
#include <numeric> 
#include <functional> 
#include <cmath> 
#include <queue> 
#include <stack> 

#define Ford(i,a,b) for (int i=(a);i<(b);i++) 
#define For(i,n) Ford(i,0,n) 
typedef long long ll; 

using namespace std;

int main(){
  int n,i=0;
  cin>>n;
  int a;
  char ans[3];
  while(n!=0){
    a = n%10;
    if(a==9){
      ans[i]="1";
    }
    else{
      ans[i]="9";
    }
    n/=10;
    i++;
  }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   25 |       ans[i]="1";
      |              ^~~
      |              |
      |              const char*
a.cc:28:14: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   28 |       ans[i]="9";
      |              ^~~
      |              |
      |              const char*
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string s; cin >>s;
  string ans =“”;
  for(int i=0; i<3; ++i)  s[i]==‘1’?  ans = ans + ‘9’:  ans = ans += ‘1’;
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc:5:15: error: extended character “ is not valid in an identifier
    5 |   string ans =“”;
      |               ^
a.cc:5:15: error: extended character ” is not valid in an identifier
a.cc:6:33: error: extended character ‘ is not valid in an identifier
    6 |   for(int i=0; i<3; ++i)  s[i]==‘1’?  ans = ans + ‘9’:  ans = ans += ‘1’;
      |                                 ^
a.cc:6:33: error: extended character ’ is not valid in an identifier
a.cc:6:51: error: extended character ‘ is not valid in an identifier
    6 |   for(int i=0; i<3; ++i)  s[i]==‘1’?  ans = ans + ‘9’:  ans = ans += ‘1’;
      |                                                   ^
a.cc:6:51: error: extended character ’ is not valid in an identifier
a.cc:6:70: error: extended character ‘ is not valid in an identifier
    6 |   for(int i=0; i<3; ++i)  s[i]==‘1’?  ans = ans + ‘9’:  ans = ans += ‘1’;
      |                                                                      ^
a.cc:6:70: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:5:15: error: '\U0000201c\U0000201d' was not declared in this scope
    5 |   string ans =“”;
      |               ^~
a.cc:6:33: error: '\U000020181\U00002019' was not declared in this scope
    6 |   for(int i=0; i<3; ++i)  s[i]==‘1’?  ans = ans + ‘9’:  ans = ans += ‘1’;
      |                                 ^~~
a.cc:6:51: error: '\U000020189\U00002019' was not declared in this scope
    6 |   for(int i=0; i<3; ++i)  s[i]==‘1’?  ans = ans + ‘9’:  ans = ans += ‘1’;
      |                                                   ^~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	int a; cin >> a;

	int d, ans = 0;
	for (int i = 0; i < 3; i++) {
		d = a % 10;
		if (d == 1) d = 9;
		else d = 1;
		ans += d * pow(10, i);
		a /= 10;
	}

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: 'pow' was not declared in this scope
   12 |                 ans += d * pow(10, i);
      |                            ^~~
Language: C++

#include<iostream>
using namespace std;
int main(){ string n;
cin >> n; for(char c:n){
if(c == ’1’){
cout << 9;
}else{
cout << 1;
} }
return 0; }

Compiler output:
a.cc:5:9: error: extended character ’ is not valid in an identifier
    5 | if(c == ’1’){
      |         ^
a.cc:5:9: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:5:9: error: '\U000020191\U00002019' was not declared in this scope
    5 | if(c == ’1’){
      |         ^~~
Language: C++

#include <iostream>
#include <string>

 int main(void){
  char output[4];
  output[3] = '\0';
  std::string str;
  std::cin >> str;
  const char* c = str.data();
  for(int i= 0;i<3;i++){
    if(c[i]=='9') output[i]= '1';
 else  if(c[i]=='1') outut[i]='9';

}
  std::cout << output;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: 'outut' was not declared in this scope; did you mean 'output'?
   12 |  else  if(c[i]=='1') outut[i]='9';
      |                      ^~~~~
      |                      output
Language: C++

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

int main() {
	string S;
	rep(i,3){
		if(S[i]=='1')S[i]='9';
		else S[i]='1';
	}
	cout<<S<<endl;
}

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

#include <stdio.h>

int main(void){
  int n;
  scanf("%d", &n);
  int m, temp;
  int ans[3];
  m = n;
  for(int i = 2; i >= 0; i--){
    a[i] = m % 10;
    m /= 10;
  }
  for(int i = 0; i < 3; i++){
    if(a[i] == 1) a[i] = 9;
    else a[i] = 1;
  }
  printf("%d\n", a[0] * 100 + a[1] * 10 + a[2]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:5: error: 'a' undeclared (first use in this function)
   10 |     a[i] = m % 10;
      |     ^
main.c:10:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#inclue<iostream>
int n;
int N;
int main(){
  cin>> n;
  N=111+999-n;
  cout<< N <<endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>> n;
      |   ^~~
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout<< N <<endl;
      |   ^~~~
a.cc:7:14: error: 'endl' was not declared in this scope
    7 |   cout<< N <<endl;
      |              ^~~~
Language: C++

#inclue<iostream>
int n;
int main(){
  cin>> n;
  n=1110-n;
  cout<< n <<endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>> n;
      |   ^~~
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout<< n <<endl;
      |   ^~~~
a.cc:6:14: error: 'endl' was not declared in this scope
    6 |   cout<< n <<endl;
      |              ^~~~
Language: C++

#inclue<iostream>
int n;
int main(){
  cin>> n;
  n=1110-n;
  cout<<n<<endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>> n;
      |   ^~~
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout<<n<<endl;
      |   ^~~~
a.cc:6:12: error: 'endl' was not declared in this scope
    6 |   cout<<n<<endl;
      |            ^~~~
Language: C++

#inclue<iostream>
int n;
int main(){
  cin>> n;
                 n=1110-n;
                 cout<<n<<endl;
                }

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>> n;
      |   ^~~
a.cc:6:18: error: 'cout' was not declared in this scope
    6 |                  cout<<n<<endl;
      |                  ^~~~
a.cc:6:27: error: 'endl' was not declared in this scope
    6 |                  cout<<n<<endl;
      |                           ^~~~
Language: C++

#inclue<iostream>
int n;int main(){cin>> n;n=1110-n;cout<<n<<endl;}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:2:18: error: 'cin' was not declared in this scope
    2 | int n;int main(){cin>> n;n=1110-n;cout<<n<<endl;}
      |                  ^~~
a.cc:2:35: error: 'cout' was not declared in this scope
    2 | int n;int main(){cin>> n;n=1110-n;cout<<n<<endl;}
      |                                   ^~~~
a.cc:2:44: error: 'endl' was not declared in this scope
    2 | int n;int main(){cin>> n;n=1110-n;cout<<n<<endl;}
      |                                            ^~~~
Language: Java

import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.Scanner;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{   
	    Scanner sc = new Scanner(System.in);
	    String s = sc.next();
	    char[] chars = s.toCharArray();
	    for(char c : chars) {
	        if(c=='1') {
	            System.out.print(9);
	        } else {
	            System.out.print(1);
	        }
	    
	    
	}
}


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

int main(int argc, char const *argv[])
{
        char n[3];
    cin>>n;
    for(int i=0;i<3;i++){
        if(n[i]=='9'){
            n[i]='1';
        }
        else{
            n[i]='9';
        }
    }
    cout<<n<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin>>n;
      |     ^~~
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout<<n<<endl;
      |     ^~~~
a.cc:13:14: error: 'endl' was not declared in this scope
   13 |     cout<<n<<endl;
      |              ^~~~
Language: C++

#include <bits/stdc++.h>

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

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

#include <iostream>
int main()
{
  int n,a[3];
  std::cin>>n;
  a[0]=n/100;
  a[1]=n/10-10*a[0];
  a[2]=n-a[1]*10-a[0]*100;
  for(int i=0;i<3;i++){
    if(a[i]==1){
      a[i]=9;
    }
    else if{
      a[i]=1;
    }
  }
  for(int i=0;i<3;i++){
    std::cout<<a[i]
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: expected '(' before '{' token
   13 |     else if{
      |            ^
      |            (
a.cc:18:20: error: expected ';' before '}' token
   18 |     std::cout<<a[i]
      |                    ^
      |                    ;
   19 |   }
      |   ~
Language: C++

#include <iostream>
int main()
{
  int n,a[3];
  std::cin>>n;
  a[0]=n/100;
  a[1]=n/10-10*c;
  a[2]=n-da*10-c*100;
  for(int k=0;k<3;k++){
    if(a[k]==1){
      a[k]=9;
    }
    else if{
      a[k]=1;
    }
  }
  for(int k=0;k<3;k++){
    std::cout<<a[k]
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'c' was not declared in this scope
    7 |   a[1]=n/10-10*c;
      |                ^
a.cc:8:10: error: 'da' was not declared in this scope; did you mean 'a'?
    8 |   a[2]=n-da*10-c*100;
      |          ^~
      |          a
a.cc:13:12: error: expected '(' before '{' token
   13 |     else if{
      |            ^
      |            (
a.cc:18:20: error: expected ';' before '}' token
   18 |     std::cout<<a[k]
      |                    ^
      |                    ;
   19 |   }
      |   ~