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

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

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

    int i=1;
    while(1){
       int x = i;
       

       if (x%3 ==0){
          cout <<" " <<i;
          break;
       }
 
       else {
             while(1){
                 if (x%10==3){
                     cout<<" " <<i;
                     break;
                  }
                  x /=10;
                  if(x==0) break;
              }
       }
       if (++i > n) break;
    }
     cout,,endl;
}
    
    


Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main(){
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int main(){
      | ~~~             
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> n;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |           cout <<" " <<i;
      |           ^~~~
      |           std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:22: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |                      cout<<" " <<i;
      |                      ^~~~
      |                      std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:30:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   30 |      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:30:11: error: expected primary-expression before ',' token
   30 |      cout,,endl;
      |           ^
a.cc:30:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   30 |      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<bits/stdc++.h>
using namespace

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

    int i=1;
    while(1){
       int x = i;
       

       if (x%3 ==0){
          cout <<" " <<i;
          break;
       }
 
       else {
             while(1){
                 if (x%10==3){
                     cout<<" " <<i;
                     break;
                  }
                  x /=10;
                  if(x==0) break;
              }
       }
       if (++i > n) break;
    }
     cout<<endl;
}
    
    


Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main(){
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int main(){
      | ~~~             
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> n;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |           cout <<" " <<i;
      |           ^~~~
      |           std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:22: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |                      cout<<" " <<i;
      |                      ^~~~
      |                      std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:30:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   30 |      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:30:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   30 |      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<bits/stdc++.h>
using namespace

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

    int i=1;
    while(1){
       int x = i;
       

       if (x%3 ==0){
          cout <<" " <<i;
          break;
       }
 
       else {
             while(1){
                 if (x%10==3){
                     cout<<" " <<i;
                     break;
                  }
                  x /=10;
                  if(x==0) break;
              }
       }
       if (++i > n) break;
    }
     cout<<endl;
     return 0;
}
    
    


Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main(){
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int main(){
      | ~~~             
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> n;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |           cout <<" " <<i;
      |           ^~~~
      |           std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:22: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |                      cout<<" " <<i;
      |                      ^~~~
      |                      std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:30:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   30 |      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:30:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   30 |      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<bits/stdc++.h>
using namespace

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

    int i=1;
    while(1){
       int x = i;
       

       if (x%3 ==0){
          cout <<" " <<i;
          break;
       }
 
       else {
             while(1){
                 if (x%10==3){
                     cout<<" " <<i;
                     break;
                  }
                  x /=10;
                  if(x == 0) break;
              }
       }
       if (++i > n) break;
    }
     cout<<endl;
     return 0;
}
    
    


Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main(){
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int main(){
      | ~~~             
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> n;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |           cout <<" " <<i;
      |           ^~~~
      |           std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:22: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |                      cout<<" " <<i;
      |                      ^~~~
      |                      std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:30:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   30 |      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:30:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   30 |      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 <bits/stdc++.h>
using namespace std;

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

  int i = 1;
  while(1) {
    int x = i;

    if(x % 3 == 0){
      cout<<" "<<i;
    }
    else {
      while(1){
	if(x % 10 == 3){
	  cout<<" "<<i;
	  break;
	}
	x /= 10;
	if(x == 0) break;
      }
    }

    if (++i > n) break;
  }
  




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

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

int main(){
  int n;
  cin>>n;
  int i=1;
  while(1){
    int x=i;
      if(x%3==0){
	cout<<" "<<i;
      }
      else{
	while(1){
	  if(x%10==3){
	    cout<<" "<<i;
	    break;
	  }
	  x /= 10;
	  if(x==0) break;
	}
      }
    if(++i > n) break;
  }



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

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

int main(){
  int n;
  cin>>n;
  int i=1;
  while(1){
    int x=i;
      if(x%3==0){
	cout<<" "<<i;
      }
      else{
	while(1){
	  if(x%10==3){
	    cout<<" "<<i;
	    break;
	  }
	  x /= 10;
	  if(x==0) break;
	}
      }
    if(++i > n) break;
  }

  cout<<endl;
  return 0;


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

#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int i=1;
while(1){
int x=i;
if(x%3==0){
cout<<" "<<i;
}
else{
while(1){
if(x%10==3){
cout<<" "<<i;
break;
}
x/=10;
if(x==0) break;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:12:5: note: to match this '{'
   12 | else{
      |     ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:7:9: note: to match this '{'
    7 | while(1){
      |         ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int i=1;
while(1){
int x=i;
if(x%3==0){
cout<<" "<<i;
}
else{
while(1){
if(x%10==3){
cout<<" "<<i;
break;
}
x/=10;
if(x==0) break;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:7:9: note: to match this '{'
    7 | while(1){
      |         ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++


import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int i = 1;
		do {
			int x = i;
			if (x % 3 == 0) {
				System.out.println(" " + i);
				break;
			}
			while (true) {
				if (x % 10 == 3) {
					System.out.println(" " + i);
					break;
				}
				x /= 10;
				if (x == 0)
					break;
			}
		} while (++i <= n);
	}
}



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

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int i = 1;
        do{
            int x = i;

            while(true){
                if(x%3==0){
                    System.out.print(" "+i);
                    break;
                }
                if(x%10==3){
                    System.out.print(" "+i);
                    break;
                }
                x/=10;
                if(x==0) continue;
                else break;
                }

        }while(++i<=n);
        System.out.println();
    }
}


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>
using namespace std;
int main(void){
    // Your code here!
    int A;
    cin>>A;
    for(int b = 1; b<=A;b++){
        if(b%3 == 0){
            cout<<" "<<b;
        }
        else if(b%10 == 3){
        cout<<" "<<b;
        }
    }
    cout<<" "<<endla;
    return 0;
}



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

#include <iostream>
using namespace std;

int main() {
	call (int n)
	int i = 1;
	int x = i;
	while (x % 3 == 0) {
		int x = i;
		cout << " " << i;
		if (i++ > n) break;
	}
	while (x % 10 == 3) {
		cout << " " << i;
		if (i++ > n) break;
	}
	
	return 0;
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: expected primary-expression before 'int'
    5 |         call (int n)
      |               ^~~
a.cc:5:9: error: 'call' was not declared in this scope; did you mean 'calloc'?
    5 |         call (int n)
      |         ^~~~
      |         calloc
a.cc:7:17: error: 'i' was not declared in this scope
    7 |         int x = i;
      |                 ^
a.cc:11:27: error: 'n' was not declared in this scope
   11 |                 if (i++ > n) break;
      |                           ^
a.cc:15:27: error: 'n' was not declared in this scope
   15 |                 if (i++ > n) break;
      |                           ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	void call (int n) {
	int i = 1;
	int x = i;
	while (x % 3 == 0) {
		int x = i;
		cout << " " << i;
		if (i++ > n) break;
	}
	while (x % 10 == 3) {
		cout << " " << i;
		if (i++ > n) break;
	}
	
	return 0;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:27: error: a function-definition is not allowed here before '{' token
    5 |         void call (int n) {
      |                           ^
Language: C++

#include <iostream>
using namespace std;

void call (int n) {
	int i = 1;
	int x = i;
	while (x % 3 == 0) {
		int x = i;
		cout << " " << i;
		if (i++ > n) break;
	}
	while (x % 10 == 3) {
		cout << " " << i;
		if (i++ > n) break;
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'void call(int)':
a.cc:17:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   17 |         return 0;
      |                ^
Language: C++

#include <iostream>
using namespace std;

void call (int n) {
	int i = 1;
	int x = i;
	while (x % 3 == 0) {
		int x = i;
		cout << " " << i;
		if (++i > n) break;
	}
	while (x % 10 == 3) {
		cout << " " << i;
		if (++i > n) break;
	}
	cout << endl;
	return 0;
}


Compiler output:
a.cc: In function 'void call(int)':
a.cc:17:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   17 |         return 0;
      |                ^
Language: C++

#include <iostream>
using namespace std;

void call (int n) {
	int i = 1;
	int x = i;
	while (x % 3 == 0) {
		int x = i;
		cout << " " << i;
		if (i++ > n) break;
	}
	while (x % 10 == 3) {
		cout << " " << i;
		if (i++ > n) break;
	}
	cout << endl;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
void call (int n) {
	int i = 1;
	int x = i;
	while (x % 3 == 0) {
		int x = i;
		std::cout << " " << i;
		if (i++ > n) break;
	}
	while (x % 10 == 3) {
		std::cout << " " << i;
		if (i++ > n) break;
	}
	std::cout <<std::endl;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

int main(){
    int n;
    cin >> n;
   for(int i =1;i<=n;++i){

       for(int x = i;x;){
            if(x%3 ==0){
                cout <<  " " << i;
            }else if(x%10==3){
                cout << " " << i;
            }else if(x/=10){
                if(x%10==3){
                cout << " " << i;
           }
       }
      
       
       cout << endl;
       
   }
    
}


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

#include<iostream>
using namespace std;
int main(){
int i,x;
cin>>x;
for(i=0;i<x;i++){
if(i%3==0){
cout<<" "<<i+1;
}
}
return0;
}


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

#include<iostream>
using namespace std;
int main(){
void call(int n){
  int i = 1;
 CHECK_NUM:
  int x = i;
  if ( x % 3 == 0 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
 INCLUDE3:
  if ( x % 10 == 3 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
  x /= 10;
  if ( x ) goto INCLUDE3;
 END_CHECK_NUM:
  if ( ++i <= n ) goto CHECK_NUM;

  cout << endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: a function-definition is not allowed here before '{' token
    4 | void call(int n){
      |                 ^
Language: C++

#include <iosteam>
int main() {
	void call(int n) {
		int i = 1;
		int x = i;
		while (x % 3 == 0) {
			x = i;
			std::cout << " " << i;
			if (i++ > n) break;
		}
		while (x != 0){
			while (x % 10 == 0) {
				std::cout << " " << i;
				if (i++ > n) break;
			}
			x /= 10;
		}

		std::cout <<  std::endl; 
	}

	return 0;
}



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

#include <iosteam>
	void call(int n) {
		int i = 1;
		int x = i;
		while (x % 3 == 0) {
			x = i;
			std::cout << " " << i;
			if (i++ > n) break;
		}
		while (x != 0){
			while (x % 10 == 0) {
				std::cout << " " << i;
				if (i++ > n) break;
			}
			x /= 10;
		}

		std::cout <<  std::endl; 
	}



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

include <iosteam>
#include <stdio.h>
	void call(int n) {
		int i = 1;
		int x = i;
		while (x % 3 == 0) {
			x = i;
			std::cout << " " << i;
			if (i++ > n) break;
		}
		while (x != 0){
			while (x % 10 == 0) {
				std::cout << " " << i;
				if (i++ > n) break;
			}
			x /= 10;
		}

		std::cout <<  std::endl; 
	}



Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iosteam>
      | ^~~~~~~
a.cc: In function 'void call(int)':
a.cc:8:30: error: 'cout' is not a member of 'std'
    8 |                         std::cout << " " << i;
      |                              ^~~~
a.cc:3:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <stdio.h>
  +++ |+#include <iostream>
    3 |         void call(int n) {
a.cc:13:38: error: 'cout' is not a member of 'std'
   13 |                                 std::cout << " " << i;
      |                                      ^~~~
a.cc:13:38: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:22: error: 'cout' is not a member of 'std'
   19 |                 std::cout <<  std::endl;
      |                      ^~~~
a.cc:19:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:36: error: 'endl' is not a member of 'std'
   19 |                 std::cout <<  std::endl;
      |                                    ^~~~
a.cc:3:8: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <stdio.h>
  +++ |+#include <ostream>
    3 |         void call(int n) {
Language: C++

#include <iosteam>
#include <stdio.h>
	void call(int n) {
		int i = 1;
		int x = i;
		while (x % 3 == 0) {
			x = i;
			std::cout << " " << i;
			if (i++ > n) break;
		}
		while (x != 0){
			while (x % 10 == 0) {
				std::cout << " " << i;
				if (i++ > n) break;
			}
			x /= 10;
		}

		std::cout <<  std::endl; 
	}



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

#include <iostream>
#include <stdio.h>
	void call(int n) {
		int i = 1;
		int x = i;
		while (x % 3 == 0) {
			x = i;
			std::cout << " " << i;
			if (i++ > n) break;
		}
		while (x != 0){
			while (x % 10 == 0) {
				std::cout << " " << i;
				if (i++ > n) break;
			}
			x /= 10;
		}

		std::cout <<  std::endl; 
	}



Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <stdio.h>
int main() {
	void call(int n) {
		int i = 1;
		int x = i;
		while (x % 3 == 0) {
			x = i;
			std::cout << " " << i;
			if (i++ > n) break;
		}
		while (x != 0){
			while (x % 10 == 0) {
				std::cout << " " << i;
				if (i++ > n) break;
			}
			x /= 10;
		}

		std::cout <<  std::endl; 
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:26: error: a function-definition is not allowed here before '{' token
    4 |         void call(int n) {
      |                          ^
Language: C++

#include <iostream>
#include <stdio.h>
int main() {
	void call(int n) {
		int i = 1;
		int x = i;
		while (x % 3 == 0) {
			x = i;
			std::cout << " " << i;
			if (i++ > n) break;
		}
		while (x != 0){
			while (x % 10 == 0) {
				std::cout << " " << i;
				if (i++ > n) break;
			}
			x /= 10;
		}

		std::cout <<  std::endl; 
	}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:26: error: a function-definition is not allowed here before '{' token
    4 |         void call(int n) {
      |                          ^
Language: C++

#include <iostream>
#include <stdio.h>
	void call(int n) {
		std::cin >> n;
		int i = 1;
		int x = i;
		while (x % 3 == 0) {
			x = i;
			std::cout << " " << i;
			if (i++ > n) break;
		}
		while (x != 0){
			while (x % 10 == 0) {
				std::cout << " " << i;
				if (i++ > n) break;
			}
			x /= 10;
		}

		std::cout <<  std::endl; 
	}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

int main() {
	int n, C, ten = 10;
	cin >> n;
	string N = n;
	int size = N.size();
	for (int i = 1; i <= n; i++) {
		C = 0;
		if (i % 3 == 0) {
			cout << " " << i;
			C++;
		}
		if (i % 10 == 3 && C == 0) {
			cout << " " << i;
			C++;
		}
		for (int j = 0; j < size; j++) {
			if (i / ten == 3 && C == 0) {
			cout << " " << i;
			C++;
		}
			ten *= 10;
		}	
	}
	cout << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |         string N = n;
      |                    ^
Language: C++

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

int main() {
	int n, t = 10, J;
	cin >> n;
	string N = to_string<n>;
	int s = N.size();
	for (int i = 1; i <= n; i++) {
		J = 0;
		if (i % 3 == 0 && J == 0) {
			cout << " " << i;
			J++;
		}
		if (i % 10 == 3 && J == 0) {
			cout << " " << i;
			J++;
		}
		for (int j = 0; j < s; j++) {
			if (i / t == 3 && J == 0) {
				cout << " " << i;
				J++;
			}
			t *= 10;
		}
	}
	cout << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<'
    8 |         string N = to_string<n>;
      |                    ~~~~~~~~~^~
a.cc:8:32: error: expected primary-expression before ';' token
    8 |         string N = to_string<n>;
      |                                ^
Language: C++

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

int main() {
	int n, t = 10, J;
	cin >> n;
	int r = n;
	to_string <r>;
	int s = r.size();
	for (int i = 1; i <= n; i++) {
		J = 0;
		if (i % 3 == 0 && J == 0) {
			cout << " " << i;
			J++;
		}
		if (i % 10 == 3 && J == 0) {
			cout << " " << i;
			J++;
		}
		for (int j = 0; j < s; j++) {
			if (i / t == 3 && J == 0) {
				cout << " " << i;
				J++;
			}
			t *= 10;
		}
	}
	cout << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<'
    9 |         to_string <r>;
      |         ~~~~~~~~~~^~
a.cc:9:22: error: expected primary-expression before ';' token
    9 |         to_string <r>;
      |                      ^
a.cc:10:19: error: request for member 'size' in 'r', which is of non-class type 'int'
   10 |         int s = r.size();
      |                   ^~~~
Language: C++

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

int main() {
	int n, t = 10, J;
	cin >> n;
	int r = n;
	to_string (r);
	int s = r.size();
	for (int i = 1; i <= n; i++) {
		J = 0;
		if (i % 3 == 0 && J == 0) {
			cout << " " << i;
			J++;
		}
		if (i % 10 == 3 && J == 0) {
			cout << " " << i;
			J++;
		}
		for (int j = 0; j < s; j++) {
			if (i / t == 3 && J == 0) {
				cout << " " << i;
				J++;
			}
			t *= 10;
		}
	}
	cout << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: warning: ignoring return value of 'std::string std::__cxx11::to_string(int)', declared with attribute 'nodiscard' [-Wunused-result]
    9 |         to_string (r);
      |         ~~~~~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4240:3: note: declared here
 4240 |   to_string(int __val)
      |   ^~~~~~~~~
a.cc:10:19: error: request for member 'size' in 'r', which is of non-class type 'int'
   10 |         int s = r.size();
      |                   ^~~~
Language: C++

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

int main() {
	int n, t = 10, J;
	cin >> n;
	int r = n;
	to_string(r);
	int s = r.size();
	for (int i = 1; i <= n; i++) {
		J = 0;
		if (i % 3 == 0 && J == 0) {
			cout << " " << i;
			J++;
		}
		if (i % 10 == 3 && J == 0) {
			cout << " " << i;
			J++;
		}
		for (int j = 0; j < s; j++) {
			if (i / t == 3 && J == 0) {
				cout << " " << i;
				J++;
			}
			t *= 10;
		}
	}
	cout << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: warning: ignoring return value of 'std::string std::__cxx11::to_string(int)', declared with attribute 'nodiscard' [-Wunused-result]
    9 |         to_string(r);
      |         ~~~~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4240:3: note: declared here
 4240 |   to_string(int __val)
      |   ^~~~~~~~~
a.cc:10:19: error: request for member 'size' in 'r', which is of non-class type 'int'
   10 |         int s = r.size();
      |                   ^~~~
Language: C++

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

int main() {
	int n, t = 10, J;
	cin >> n;
	int r = n;
	to_string(r);
	int s = r.size();
	for (int i = 1; i <= n; i++) {
		J = 0;
		if (i % 3 == 0 && J == 0) {
			cout << " " << i;
			J++;
		}
		if (i % 10 == 3 && J == 0) {
			cout << " " << i;
			J++;
		}
		for (int j = 0; j < s; j++) {
			if (i / t == 3 && J == 0) {
				cout << " " << i;
				J++;
			}
			t *= 10;
		}
	}
	cout << endl;
	return 0;
}


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


int main(){
   while(1){
     int H, W;
     cin>>H>>W;
     if(H == 0 && W == 0)  break;

     for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
          if((i + j) % 2 == 0) cout<<"#3 4

          else cout<<".";
          }
          cout<<endl;

        }
        cout<<endl;
 
    }

    return 0;
}


Compiler output:
a.cc:10:38: warning: missing terminating " character
   10 |           if((i + j) % 2 == 0) cout<<"#3 4
      |                                      ^
a.cc:10:38: error: missing terminating " character
   10 |           if((i + j) % 2 == 0) cout<<"#3 4
      |                                      ^~~~~
a.cc: In function 'int main()':
a.cc:5:6: error: 'cin' was not declared in this scope
    5 |      cin>>H>>W;
      |      ^~~
a.cc:10:32: error: 'cout' was not declared in this scope
   10 |           if((i + j) % 2 == 0) cout<<"#3 4
      |                                ^~~~
a.cc:12:11: error: expected primary-expression before 'else'
   12 |           else cout<<".";
      |           ^~~~
a.cc:14:11: error: 'cout' was not declared in this scope
   14 |           cout<<endl;
      |           ^~~~
a.cc:14:17: error: 'endl' was not declared in this scope
   14 |           cout<<endl;
      |                 ^~~~
a.cc:17:9: error: 'cout' was not declared in this scope
   17 |         cout<<endl;
      |         ^~~~
a.cc:17:15: error: 'endl' was not declared in this scope
   17 |         cout<<endl;
      |               ^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
    int n, c, s, I;
    cin >> n;
    for (int i = 1; i <= n; i++) {
        c = 0;
        t = 10;
        s = 0;
        I = i;
        if (i % 3 == 0 && c == 0) {
            cout << " " << i;
            c++;
        }
        if (i % 10 == 3 && c == 0) {
            cout << " " << i;
            c++;
        }
        if (c == 0){
            while (I / 10 != 0) {
                I /= 10;
                if (I == 3) {
                    cout << " " << i;
                }
            }
        }
    }
    cout << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 't' was not declared in this scope
    8 |         t = 10;
      |         ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	cin << n;
	for(int i = 1; i <= 30; i++)
	{
		if (x % 3 == 0 && x % 10 == 3) {
		cout << " " << i;
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 'n' was not declared in this scope
    6 |         cin << n;
      |                ^
a.cc:9:21: error: 'x' was not declared in this scope
    9 |                 if (x % 3 == 0 && x % 10 == 3) {
      |                     ^
Language: C++

#include<bits/stdc++.h>

using namespace std;


int main(){

int i=1;

cin>>n;

for(int s;s<n;s++){
int x=i;
if ( x % 3 == 0 )cout<<" "<<i;

else( x % 10 == 3 )cout<<" "<<i;

}

cout << endl;

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: 'n' was not declared in this scope
   10 | cin>>n;
      |      ^
a.cc:16:20: error: expected ';' before 'cout'
   16 | else( x % 10 == 3 )cout<<" "<<i;
      |                    ^~~~
      |                    ;
Language: C++

#include<bits/stdc++.h>

using namespace std;


int main(){

int n;

cin>>n;
int i = 1;
while(1){
int x=i;

if(x%3==0)cout<<" "<<i;

else{
while(1){
if(x%10==3)cout<<" "<<i;
break;
}
x/=10;
if(x==0)break;
}
}
if(++i>n) break;
}

cout<<endl;

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:11: error: break statement not within loop or switch
   26 | if(++i>n) break;
      |           ^~~~~
a.cc: At global scope:
a.cc:29:1: error: 'cout' does not name a type
   29 | cout<<endl;
      | ^~~~
a.cc:31:1: error: expected unqualified-id before 'return'
   31 | return 0;
      | ^~~~~~
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^
Language: C++

#include "stdafx.h"
#include <iostream>
using namespace std;

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

	for (int i = 1; i <= n; i++)
	{
		int x = i;
		if (x % 3 == 0 || x % 10 == 3) {
			cout << " " << i;
		}
		else
		{
			x /= 10;
			while (x)
			{
				if (x % 10 == 3) {
					cout << " " << i;
					break;
				}
				else
					x /= 10;
			}
		}
	}
	cout << endl;
}


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

#include<iostream>
using namespace std;
void call(int n){
  int i = 1;
 CHECK_NUM:
  int x = i;
  if ( x % 3 == 0 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
 INCLUDE3:
  if ( x % 10 == 3 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
  x /= 10;
  if ( x ) goto INCLUDE3;
 END_CHECK_NUM:
  if ( ++i <= n ) goto CHECK_NUM;

  cout << endl;
}



Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
using namespace std;
int main(){
	int i=1,n,x;
	cin>>n;
	while(1){
		while(1){
			x=i;
			if(x%3==0){
				cout<<" "<<i;
				break;
			}
			x=x/10;
			if(x!=0)break;
			if(++1<=n)break;
		}
	}
	cout<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:30: error: lvalue required as increment operand
   15 |                         if(++1<=n)break;
      |                              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
void call(int n){
  int i = 1;
 CHECK_NUM:
  int x = i;
  if ( x % 3 == 0 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
 INCLUDE3:
  if ( x % 10 == 3 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
  x /= 10;
  if ( x ) goto INCLUDE3;
 END_CHECK_NUM:
  if ( ++i <= n ) goto CHECK_NUM;

  cout << endl;
}



Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#define _USE_MATH_DEFINES
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cstring>
#include <climits>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
void call(int n){
  int i = 1;
 CHECK_NUM:
  int x = i;
  if ( x % 3 == 0 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
 INCLUDE3:
  if ( x % 10 == 3 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
  x /= 10;
  if ( x ) goto INCLUDE3;
 END_CHECK_NUM:
  if ( ++i <= n ) goto CHECK_NUM;

  cout << endl;
}



Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <cstdio>

int main()
{
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++)
    {
        if (i % 3 == 0)
        {
            printf(" %d", i);
            continue;
        } //iが３の倍数かどうか
        if (i % 10 == 3)
        {
            printf(" %d", i);
            continue;
        } //iの10の位が3かどうか
        else
        {
            for (int x = i; x != 0; x /= 10)
                if (x % 10 == 3 || x == 3)
                {
                    printf(" %d", i);
                } //iのm(>=2)の位が３かどうか}
        }
        printf("\n");
        return 0;
    }


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

#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
void call(int n){
  int i = 1;
 CHECK_NUM:
  int x = i;
  if ( x % 3 == 0 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
 INCLUDE3:
  if ( x % 10 == 3 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
  x /= 10;
  if ( x ) goto INCLUDE3;
 END_CHECK_NUM:
  if ( ++i <= n ) goto CHECK_NUM;

  cout << endl;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int main(){
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
		int x=i
	if(x%3==0||x%10==3){
		cout<<" "<<i;
	}
	else {
		x/=10;
		if(x){
			if(x%10==3){
				cout<<" "<<i;
			}
		}
	}
	return 0;
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected ',' or ';' before 'if'
   10 |         if(x%3==0||x%10==3){
      |         ^~
a.cc:13:9: error: 'else' without a previous 'if'
   13 |         else {
      |         ^~~~
Language: C++

//与えられた数nについて、1~nまでの数の中で、3の倍数と3の数字が含まれる数を昇順で出力する

#include<cstdio>
int main(){
    int N;
    scanf("%d",&N);
    for(int n = 1; n <= N; n++){
        if(n % 3 == 0){
            printf("%d",n)
        }
        else{
            int d;
            for(int i = 10;; i = i * 10){
                if(i <= n){
                }
                else if{
                    d = i / 10
                    break;
                }
            }
            for(int j = 1;; j++){
                int Q,R;
                int x = n;
                Q = x / 10;
                R = x % 10;
                if(Q == 3 || R == 3){
                    printf("%d",n);
                    break;
                }
                else{
                    x = Q;
                    if(x = 0){
                        break;
                    }
                }
            }
        }
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: expected ';' before '}' token
    9 |             printf("%d",n)
      |                           ^
      |                           ;
   10 |         }
      |         ~                  
a.cc:16:24: error: expected '(' before '{' token
   16 |                 else if{
      |                        ^
      |                        (
Language: C++

# include <iostream>
# include <stdint.h>
# include <stdio.h>
# include <math.h>
using namespace std;


int main(){
	int n ,a,b;
	cin >>n;
	cout <<" ";
	for(int i =1; i <n+1;i++){
cout <<" ";
		int a =i%3;
		int b =i %10;
		if (a ==0 ||b ==3){
			cout <<i；
		}
	}
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:17:32: error: 'i\U0000ff1b' was not declared in this scope
   17 |                         cout <<i；
      |                                ^~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int n;
    cin>>n;
    
    for(int i=1; i<=n; i++){
        if(i%3==0){
            cout<<" "<<i;
        }else{
            x=i;
            do{
                if(i%10==3){
                    cout<<" "<<i;
                    break;
                }
                x/=10;
            }while(x);
        }
    }
    cout<<endl;
    
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'x' was not declared in this scope
   11 |             x=i;
      |             ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int n;
    cin>>n;
    
    for(int i=1; i<=n; i++){
        if(i%3==0){
            cout<<" "<<i;
        }else{
            x=i;
            do{
                if(i%10==3){
                    cout<<" "<<i;
                    break;
                }
                x/=10;
            }while(x)
        }
    }
    cout<<endl;
    
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'x' was not declared in this scope
   11 |             x=i;
      |             ^
a.cc:18:22: error: expected ';' before '}' token
   18 |             }while(x)
      |                      ^
      |                      ;
   19 |         }
      |         ~
Language: C++

#include <stdio.h>

int main() {

	int n;
	int i = 1;
	scanf_s("%d", &n);

	while (true) {

		int x = i;

		if (x % 3 == 0) {
			printf("%d", i);
		}
		if (x % 10 == 3) {
			printf("%d", i);
		}
		x /= 10;
		//if (x) mode = 1;
		if (++i > n) break;
	}

	return 0;

}


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

#include<stdio.h>^M
^M
int main(){^M
   int n,i,x;^M
   scanf("%d",&n);^M
   for(i=1;i<=n;i++){^M
     x=i;^M
     if(x%3==0){^M
       printf(" %d",i);^M
     }else if(x%10==3){^M
       printf(" %d",i);^M
   }else{^M
     while(x !=0){^M
       x /=10;^M
       if(x%10==3){^M
         printf(" %d",i);^M
         break;^M
       }^M
     }^M
   }^M
 }^M
   printf("\n");^M
   return 0;^M



Compiler output:
a.cc:1:18: warning: extra tokens at end of #include directive
    1 | #include<stdio.h>^M
      |                  ^
a.cc:2:1: error: expected unqualified-id before '^' token
    2 | ^M
      | ^
Language: C++

#include <stdio.h>

int main() {

	int n;
	scanf("%d", &n);

	for (int i = 1; i <= n; i++) {
		int x = i;
		if (x % 3 == 0 && fin == 0) {
			printf(" %d", i);
		}
		if (x % 10 == 3 && i == 3) {
			printf(" %d", i);
		}
	}
printf("\n");
	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:35: error: 'fin' was not declared in this scope
   10 |                 if (x % 3 == 0 && fin == 0) {
      |                                   ^~~
Language: C++

#include <stdio.h>

int main() {

	int n;
	scanf("%d", &n);

	for (int i = 1; i <= n; i++) {
		int x = i;
		if (x % 3 == 0) {
			printf(" %d", i);
		}
		if (x % 10 == 3 && i !! 3) {
			printf(" %d", i);
		}
	}
printf("\n");
	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:37: error: expected ')' before '!' token
   13 |                 if (x % 10 == 3 && i !! 3) {
      |                    ~                ^~
      |                                     )
Language: C++

#include <stdio.h>

int main() {

	int n;
	scanf("%d", &n);

	for (int i = 1; i <= n; i++) {
		int x = i;
		if (x % 3 == 0) {
			printf(" %d", i);
		}
		if (x % 10 == 3 && i ! 3) {
			printf(" %d", i);
		}
	}
printf("\n");
	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:37: error: expected ')' before '!' token
   13 |                 if (x % 10 == 3 && i ! 3) {
      |                    ~                ^~
      |                                     )
Language: C++

#include <stdio.h>

int main() {

	int n;
	scanf_s("%d", &n);

	for (int i = 1; i <= n; i++) {
		int x = i;
		int fin = 0;
		if (x % 3 == 0) {
			printf(" %d", i);
		}
		if (x % 10 == 3 && i != 3) {
			printf(" %d", i);		
                }

	}
	printf("\n");

	return 0;

}


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

#include<iostream>

using namespace std;

int main()
{
  int n;
  cin >> n
  int x=1;
  while(x<=n){
  if(x%3==0||x%10==3||x/10==3||x/100==3||x/1000==3)
    cout << " " << x;
  x++;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected ';' before 'int'
    8 |   cin >> n
      |           ^
      |           ;
    9 |   int x=1;
      |   ~~~      
a.cc:10:9: error: 'x' was not declared in this scope
   10 |   while(x<=n){
      |         ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	int n;
	cin >> n ;
	for (int i = 1; i <= n; i++){
		if (i % 3 == 0){
			cout << " " << i;
		}
		if (i % 10 == 3){
			if (i % 3 == 0 && i % 10 == 3)
			{
				cout << "";
			}
			else{
				cout << " " << i;
			}
		}
	}
	cout << endl; return 0;



Compiler output:
a.cc: In function 'int main()':
a.cc:20:32: error: expected '}' at end of input
   20 |         cout << endl; return 0;
      |                                ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^