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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:2: error: expected 'while' at end of input
   14 | }
      |  ^
a.cc:14:2: error: expected '(' at end of input
   14 | }
      |  ^
      |  (
a.cc:14:2: error: expected primary-expression at end of input
a.cc:14:2: error: expected ')' at end of input
   14 | }
      |  ^
      |  )
a.cc:14:2: error: expected ';' at end of input
   14 | }
      |  ^
      |  ;
a.cc:14:2: error: expected '}' at end of input
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:27: error: lvalue required as left operand of assignment
   13 |             while(x >= 10 | x = 3) {
      |                   ~~~~~~~~^~~
Language: C++

#include <iostream>
using namespace std;

int main(){

 int i, x, n;

 cin >> n;

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

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

// Structured Programming

#include <iostream>
#include <cassert>

namespace {

void call(int i, int n)
{
  if (i % 3 == 0)) {
    std::cout << " " << n;
  }
  else {
    int t;
    for (t = i; t != 0; t /= 10) {
      if (t % 10 == 3) {
        std::cout << " " << n;
        break;
      }
    }
  }

  if (i > n) call(i + 1, n);
}

}

int main()
{
  int n;
  std::cin >> n;
  assert(3 >= 0 && n <= 10000);

  call(1, n);

  return 0;
}

Compiler output:
a.cc: In function 'void {anonymous}::call(int, int)':
a.cc:10:18: error: expected primary-expression before ')' token
   10 |   if (i % 3 == 0)) {
      |                  ^
Language: C++

// Structured Programming

#include <iostream>
#include <cassert>

void call(int n)
{
  for (i = 1; i <= n; ++i) {
    if (i % 3 == 0) {
      std::cout << " " << n;
    }
    else {
      int digit = i;
      while (digit != 0) {
        if (digit % 10 == 3) {
          std::cout << " " << n;
        }
        digit /= 10;
      }
    }
  }

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

int main()
{
  int n;
  std::cin >> n;
  assert(3 >= 0 && n <= 10000);

  call(n);

  return 0;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |   for (i = 1; i <= n; ++i) {
      |        ^
Language: C++

#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
//#include <utility>
#include <set>
#include <iostream>
//#include <memory>
#include <string>
#include <vector>
#include <algorithm>
//#include <functional>
#include <sstream>
//#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
//#include <cctype>
#include <cstring>
//#include <ctime>
#include <iterator>
#include <bitset>
//#include <numeric>
//#include <list>
//#include <iomanip>

#if __cplusplus >= 201103L
#include <array>
#include <tuple>
#include <initializer_list>
#include <unordered_set>
#include <unordered_map>
#include <forward_list>

#define cauto const auto&
#else

#endif

using namespace std;


namespace{
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
    v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
    stringstream ss;
    ss << f;
    ss >> t;
}


#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define F first
#define S second
#define mkp make_pair
#define RALL(v) (v).rbegin(),(v).rend()


#define MOD 1000000007LL
#define EPS 1e-8
static const int INF=1<<24;

void mainmain(){
  int n;
  while(cin>>n,n){
    reep(i,1,n){
      int x=i;
      int f=0;
      while(1){
        if(f>=0x%3==0){
          cout<<" "<<i;
        }
        else{
          do{
            if(x%10==3){
              cout<<" "<<i;
              break;
            }
            x/=10;
          }while(x);
        }
        if(i+1<=n) continue;
        break;
      }
    }
  }
}



}
main() try{
    mainmain();
}
catch(...){
}

Compiler output:
a.cc: In function 'void {anonymous}::mainmain()':
a.cc:91:15: error: unable to find numeric literal operator 'operator""x'
   91 |         if(f>=0x%3==0){
      |               ^~
a.cc: At global scope:
a.cc:113:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
  113 | main() try{
      | ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'call' was not declared in this scope; did you mean 'calloc'?
    6 |   call(n);
      |   ^~~~
      |   calloc
Language: C++

include <iostream>
using namespace std;

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

  cout << endl;
}

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'void call(int)':
a.cc:8:7: error: 'cout' was not declared in this scope
    8 |       cout << " " << i;
      |       ^~~~
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout << " " << i;
      |         ^~~~
a.cc:19:3: error: 'cout' was not declared in this scope
   19 |   cout << endl;
      |   ^~~~
a.cc:19:11: error: 'endl' was not declared in this scope
   19 |   cout << endl;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:24:3: error: 'cin' was not declared in this scope
   24 |   cin >> n;
      |   ^~~
Language: C++

#include <stdio.h>
void call(int x)
{


scanf("%d",&x);
for(int i=2;i<=x;i++)
{
if(i%3==0)printf(" %d",i);
else if(i%10==3)printf(" %d",i);

}
printf("\n");

return 0;
}

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

#include<iostream>

using namespace std;

int main()
{

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

Compiler output:
a.cc:32:1: error: unterminated comment
   32 | /*
      | ^
Language: C++

#include<iostream>
using namespace std;

void call(int n){
    for(int i = 3; i <= n; i++){
       if(i % 3 == 0 || has3(i)){
           cout << " " << i;
       }
    }
    cout << endl;
}

bool has3(int i){
    while(i){
        if(i % 10 == 3){
            return true;
        }
        i /= 10;
    }
    return false;
}


int main(){
    int n;
    cin >> n;
    call(n);
    return 0;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:6:25: error: 'has3' was not declared in this scope
    6 |        if(i % 3 == 0 || has3(i)){
      |                         ^~~~
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();
		for( int i = 1; i <= n; i++ ) {
			if ( i % 3 == 0 ) {
				System.out.print( " " + i );
				
			} else if ( i % 10 == 3 ) {
				System.out.print( " " + i );
				
			} else if ( i / 10 == 3) {
				System.out.print( " " + i );
			
			}
		}
		System.out.print("\n");
	}
}

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

#include<stdio.h>

int main()
{
	int n;
	scanf_s("%d", &n);
	int i;
	for (i = 1; i <= n - 1; i++)
	{
		if (i % 3 == 0 || i % 10 == 3) printf("%d ", i);
	}
	if (i % 3 == 0 || i % 10 == 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++

import java.util.Scanner;
public class Main{
	public static void main(String[]args){
		Scanner sc=new Scanner(System.in);
		int num=sc.nextInt();
		for(int i=3;i<=num;i++){
			if(i%3==0){
				System.out.printf("%d ",i);
			}else if(i%10==3){
				System.out.printf("%d ",i);
			}else if(i%100==3){
				System.out.printf("%d ",i);
			}else if(i%1000==3){
				System.out.printf("%d ",i);
			}else if(i%10000==3){
				System.out.printf("%d ",i);
			}
		}
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:2:1: error: expected unqualified-id before 'public'
    2 | 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 num=sc.nextInt();
		for(int i=3;i<=num;i++){
			if(i%3==0){
				System.out.printf("%d ",i);
			}else if(i%10==3){
				System.out.printf("%d ",i);
			}else if(i%100==3){
				System.out.printf("%d ",i);
			}else if(i%1000==3){
				System.out.printf("%d ",i);
			}else if(i%10000==3){
				System.out.printf("%d ",i);
			}
		}
		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:2:1: error: expected unqualified-id before 'public'
    2 | public class Main{
      | ^~~~~~
Language: C++

import java.util.Scanner;
	public class Main {
	public static void main(String[] args) {
	Scanner sc= new Scanner(System.in);
	//while(true) {
	int a = sc.nextInt();
	int i;
	//if (a == 0) {
	//break;
	
	for(i=3;i<=a;i++){int j=i;
		if(j%3==0){System.out.printf(" "+i);
		
		}else{
		while(j!=0){if(j%10==3){System.out.printf(" "+i);
	     
		}j/=10;}
		}}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:2:9: error: expected unqualified-id before 'public'
    2 |         public class Main {
      |         ^~~~~~
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'void call(int)':
a.cc:14:32: error: 'x' was not declared in this scope
   14 |                         while (x / 10 != 0)
      |                                ^
Language: C++

#include<iostream>
using namespace std;

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

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: expected ';' before '}' token
   13 |         x /= 10
      |                ^
      |                ;
   14 |       }
      |       ~
Language: C++

#include <stdio.h>

int main(void){
    int x, n;

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

Compiler output:
a.cc:6:11: warning: missing terminating " character
    6 |     scanf("%d, &n);
      |           ^
a.cc:6:11: error: missing terminating " character
    6 |     scanf("%d, &n);
      |           ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: expected primary-expression before 'for'
    7 |     for (int i=1; i<=n; i++){
      |     ^~~
a.cc:7:19: error: 'i' was not declared in this scope
    7 |     for (int i=1; i<=n; i++){
      |                   ^
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;
		}
		else{
			for(int x = i; x == 0; x /= 10){
				if(x % 10 == 3){
					cout << " " << i;
				}
			}
		}
	}
	cout << endl;

	return = 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: expected primary-expression before '=' token
   21 |         return = 0;
      |                ^
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;
		}
		else{
			for(int x = i; x == 0; x /= 10){
				if(x % 10 == 3){
					cout << " " << i;
				}
			}
		}
	}
	cout << endl;

	return=0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: expected primary-expression before '=' token
   21 |         return=0;
      |               ^
Language: C++

#include <iostream>
using namespace std;

int involve3(int a){
  int flag=0;
  int tmp=a;
  while(1){
    if(tmp%10 == 3){
      flag=1;
      break;
    }
     tmp = tmp/10;   
  }
return flag;
}

int main(){
  int num=60;
  int a=3;
  int tmp;
  cin>>num;
  while(1){
    if(a>num) break;
    if(a%3==0){
      cout<<" "<<a;
    }else if(involve3==1){
      cout<<" "<<a;
    }
    a+=1;
  }
  cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |     }else if(involve3==1){
      |              ~~~~~~~~^~~
Language: C++

#include <iostream>
using namespace std;

int involve3(int a){
  int flag=0;
  int tmp=a;
  while(1){
    if(tmp%10 == 3){
      flag=1;
      break;
    }
     tmp = tmp/10;   
  }
return flag;
}

int main(){
  int num=60;
  int a=3;
  int tmp;
  cin>>num;
  while(1){
    if(a>num) break;
    if(a%3==0){
      cout<<" "<<a;
    }else if(involve3()==1){
      cout<<" "<<a;
    }
    a+=1;
  }
  cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:22: error: too few arguments to function 'int involve3(int)'
   26 |     }else if(involve3()==1){
      |              ~~~~~~~~^~
a.cc:4:5: note: declared here
    4 | int involve3(int a){
      |     ^~~~~~~~
Language: C++

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			int val = Integer.parseInt(br.readLine());
			for (int i = 1; i <= val; i++) {
				if (i % 3 == 0 || i % 10 == 3)
					System.out.print(" " + i);
			}
			System.out.println();
			br.close();
		} catch (Exception e) {
			System.err.println(e);
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.InputStreamReader;
      | ^~~~~~
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++

#include <iostream>
using namespace std;

bool has3(int x){
	while(x){
		if (x % 10 == 3) return true;
		x /= 10;
	}
		return false;{
}

void call(int n){
	for(int x=1; x<=n; x++){
		if(x % 3 == 0 || has3(x)){
			cout << " " << x;
			}
	}
	cout << endl;
}

int main(){
	int n;
	cin >> n;
	call(n);
	
	return 0;
}

}

Compiler output:
a.cc: In function 'bool has3(int)':
a.cc:12:17: error: a function-definition is not allowed here before '{' token
   12 | void call(int n){
      |                 ^
a.cc:21:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   21 | int main(){
      |         ^~
a.cc:21:9: note: remove parentheses to default-initialize a variable
   21 | int main(){
      |         ^~
      |         --
a.cc:21:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:21:11: error: a function-definition is not allowed here before '{' token
   21 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

bool has3(int x){
	while(x){
		if (x % 10 == 3) return true;
		x /= 10;
	}
		return false;{
}

void call(int n){
	for(int x=1; x<=n; x++){
		if(x % 3 == 0 || has3(x)){
			cout << " " << x;
			}
	}
	cout << endl;
}

int main(){
	int n;
	cin >> n;
	call(n);
	
	return 0;

}

Compiler output:
a.cc: In function 'bool has3(int)':
a.cc:12:17: error: a function-definition is not allowed here before '{' token
   12 | void call(int n){
      |                 ^
a.cc:21:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   21 | int main(){
      |         ^~
a.cc:21:9: note: remove parentheses to default-initialize a variable
   21 | int main(){
      |         ^~
      |         --
a.cc:21:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:21:11: error: a function-definition is not allowed here before '{' token
   21 | int main(){
      |           ^
a.cc:28:2: error: expected '}' at end of input
   28 | }
      |  ^
a.cc:4:17: note: to match this '{'
    4 | bool has3(int x){
      |                 ^
Language: C++

#include <cstdio>
#include <iostream>

int main(void){
  int n,i = 1;
  scanf("%d",&n);
 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:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     cout << " " << i;
      |     ^~~~
      |     std::cout
In file included from a.cc:2:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |     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:23:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |   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:23:11: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   23 |   cout << endl;
      |           ^~~~
      |           std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

n = int(input())
for i in range(1, n + 1):
    if i % 3 == 0 or '3' in str(i):
        print(' ' + str(i), end='')
print()

Compiler output:
a.cc:4:33: error: empty character constant
    4 |         print(' ' + str(i), end='')
      |                                 ^~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc:4:1: error: 'itn' does not name a type; did you mean 'int'?
    4 | itn main(){
      | ^~~
      | int
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: expected ';' before '}' token
   14 |     ++i
      |        ^
      |        ;
   15 |     }
      |     ~   
a.cc:16:8: error: statement cannot resolve address of overloaded function
   16 |    endl;
      |        ^
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: expected ';' before '}' token
   14 |     ++i
      |        ^
      |        ;
   15 |     }
      |     ~   
a.cc:16:8: error: statement cannot resolve address of overloaded function
   16 |    endl;
      |        ^
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: expected ';' before '}' token
   14 |     ++i
      |        ^
      |        ;
   15 |     }
      |     ~
Language: C++

#include<iostream>
using namespace std;

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

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

int main(int argc, const char * argv[])
{

    int n;
    cin >> n;

    for (int i = 0; i <= n; i++) {
        if (i == 0) {
            printf(" ");
        }

        else if (i % 3 == 0){
            printf("%d ",i);
        }

        else if (i % 10 == 3) {
            printf("%d ",i);
        }

    }
    printf("\n");

    return 0;

}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> n;
      |     ^~~
a.cc:9:13: error: 'printf' was not declared in this scope
    9 |             printf(" ");
      |             ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(int argc, const char * argv[])
a.cc:13:13: error: 'printf' was not declared in this scope
   13 |             printf("%d ",i);
      |             ^~~~~~
a.cc:13:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:17:13: error: 'printf' was not declared in this scope
   17 |             printf("%d ",i);
      |             ^~~~~~
a.cc:17:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:21:5: error: 'printf' was not declared in this scope
   21 |     printf("\n");
      |     ^~~~~~
a.cc:21:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>

int main()
{
    int num;
    std::cin>>num;
    std::vector<int> vec;
    for(int i = 3;i <= num;++i)
    {
        if(i%3==0)
            vec.push_back(i);
        if(i%10==3)
            vec.push_back(i);
    }
    for(auto elem:vec)
          std::cout<<" "<<elem;
    std::cout<<std:endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:19: error: found ':' in nested-name-specifier, expected '::'
   19 |     std::cout<<std:endl;
      |                   ^
      |                   ::
Language: C++

      
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:
a.cc: In function 'void call(int)':
a.cc:7:5: error: 'cout' was not declared in this scope
    7 |     cout << " " << i;
      |     ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << " " << i;
      |     ^~~~
a.cc:20:3: error: 'cout' was not declared in this scope
   20 |   cout << endl;
      |   ^~~~
a.cc:20:11: error: 'endl' was not declared in this scope
   20 |   cout << endl;
      |           ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'void call(int)':
a.cc:5:10: error: 'cout' was not declared in this scope
    5 |          cout << " " << i;
      |          ^~~~
a.cc:10:15: error: 'cout' was not declared in this scope
   10 |               cout << " " << i;
      |               ^~~~
a.cc:17:3: error: 'cout' was not declared in this scope
   17 |   cout << endl;
      |   ^~~~
a.cc:17:11: error: 'endl' was not declared in this scope
   17 |   cout << endl;
      |           ^~~~
Language: C++

#include <iostream>
#include <cstdlib>

using namespace std;

void call(int n){
  for(int i=1;i<=n;i++){
     int x = i;
     if ( x % 3 == 0 ){
         cout << " " << i;
         continue;
     }else{
        while(x){
           if ( x % 10 == 3 ){
              cout << " " << i;
              if ( ++i > n )break;
           }
           x /= 10;
        }
     }
  }
  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;
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>
#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;
}

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

int main() {
    int n;
    cin >> n;
    call(n);
    return 0;
}

Compiler output:
a.cc:26:6: error: redefinition of 'void call(int)'
   26 | void call(int n) {
      |      ^~~~
a.cc:5:6: note: 'void call(int)' previously defined here
    5 | void call(int n){
      |      ^~~~
Language: C++

#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<cstdlib>
#include<iomanip>
#include<queue>
#include<set>
#include <valarray>
#include<stack>
#include<sstream>
#include<math.h>
   
using namespace std;
    
void call(int n)
{        
    for(int i = 1; i <= n; i++)
    {
        if ( i % 3 == 0 )
       {
            cout << " " << i;
       }
        else if( i % 10 == 3 )
        {
            cout << " " << i;
        }
        else
        {
            while(x)  //repeat  i/10
            {
                int x = i / 10;
            
                if(x % 10 ==3)
                {
                    cout<<" "<<i;
                    break;
                }
            } 
        }
    }
    
  cout << endl;
}
int main()
{
    int n;
    cin>>n;
    
    call(n);
    return 0;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:33:19: error: 'x' was not declared in this scope
   33 |             while(x)  //repeat  i/10
      |                   ^
Language: C++

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

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

#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){
       cout<<" "<<i;
     }
   else if(x%10==3){
	   cout<<" "<<i;
   }
   else {
	   int d=x/10;
	   while(d!=0){
	   if(d%10==3){
		   cout<<" "<<i;
	   }
	   else{
		  d/=10;
   }
   }
}
cout<<endl;
return 0;
}

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

#include <iostream>
using namespace std;

void include3(int x, int i){
  if(x % 10 == 3) {
    cout  << " " << i;
  }else{
    x /= 10;
    if(x) include3(x, i);
  }
}

void call(n){
  int i, x

  for(i = 1; i < n+1; ++i){
    x = i;
    if(x % 3 == 0) {
      cout << " " << i;
    }else{
      include3(x, i);
    }
  }
  
}

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

  call(n);
}

Compiler output:
a.cc:13:6: error: variable or field 'call' declared void
   13 | void call(n){
      |      ^~~~
a.cc:13:11: error: 'n' was not declared in this scope
   13 | void call(n){
      |           ^
a.cc: In function 'int main()':
a.cc:31:3: error: 'call' was not declared in this scope; did you mean 'calloc'?
   31 |   call(n);
      |   ^~~~
      |   calloc
Language: C++

#include <iostream>
using namespace std;

void call(int n);
int main()
{
	int n;

	scanf_s("%d",&n);
	call(n);
	return 0;
}
void call(int n){
  int i = 1;

  do {
	int x = i;
    if ( x % 3 == 0 ){
      std::cout << " " << i;
    }
    else {
      do {
        if ( x % 10 == 3 ){
          std::cout << " " << i;
          break;
        }
        x /= 10;
      } while(x);
    }
  } while(++i <= n);

  return ;
}

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

void call(int n){
  int i = 1;

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

  return ;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:7:7: error: 'cout' was not declared in this scope
    7 |       cout << " " << i;
      |       ^~~~
a.cc:12:11: error: 'cout' was not declared in this scope
   12 |           cout << " " << i;
      |           ^~~~
Language: C++

#include <iostream>
using namespace std;

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

	call(n);
	for(int i = 1; i <= n; ++i) { 
		int x = i;
		if(x%3==0) {
			cout << " " << i;
			continue;
		}
		if(x%10==3) cout << " " << i;
		x /= 10;
		if(x%10==3) {
			cout << " " << i;
			continue;
		}
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'call' was not declared in this scope; did you mean 'calloc'?
    8 |         call(n);
      |         ^~~~
      |         calloc
Language: C++

using namespace std;

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


int main() {
    int n;
    cin >> n;
    call(n);
    return 0;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:8:13: error: 'cout' was not declared in this scope
    8 |             cout << " " << i;
      |             ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:10:13: error: 'cout' was not declared in this scope
   10 |             cout << " " << i;
      |             ^~~~
a.cc:10:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << endl;
      |     ^~~~
a.cc:13:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:13: error: 'endl' was not declared in this scope
   13 |     cout << endl;
      |             ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc: In function 'int main()':
a.cc:19:5: error: 'cin' was not declared in this scope
   19 |     cin >> n;
      |     ^~~
a.cc:19:5: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

int main(void){
	int n;
	cin >> n;
	call(n);
	
	return 0;
}

Compiler output:
a.cc: In function 'void call_sub(int, int)':
a.cc:19:21: error: expected ';' before '}' token
   19 |         cout << endl
      |                     ^
      |                     ;
   20 | }
      | ~                    
a.cc: In function 'void call(int)':
a.cc:32:45: error: too many arguments to function 'void call(int)'
   32 |                                         call(n, i);
      |                                         ~~~~^~~~~~
a.cc:21:6: note: declared here
   21 | void call(int n){
      |      ^~~~
Language: C++

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

int main(void){
	int n;
	cin >> n;
	call(n);
	
	return 0;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:32:45: error: too many arguments to function 'void call(int)'
   32 |                                         call(n, i);
      |                                         ~~~~^~~~~~
a.cc:21:6: note: declared here
   21 | void call(int n){
      |      ^~~~
Language: C++

#include <iostream>
using namespace std;

void check_num(int *i, int *x, int *n){
	*x = *i;
	if( *x % 3 == 0 ){
		cout << " " << *i;
		end_check_num(i, x, n);	
	}
}
void includ3(int *i, int *x, int *n){
	if( *x % 10 == 3 ){
		cout << " " << *i;
		end_check_num(i, x, n);
	}
	*x /= 10;
	if(*x) include3(i, x, n);
}
void end_chek_num(int *i, int *x, int *n){
	if( ++(*i) <= *n ) check_num(i, x, n);
	cout << endl;
}

void call(int n){
	int i = 1;
	int x = 0;
	check_num(&i, &x, &n);
	include3(&i, &x, &n);
	end_chek_num(&i, &x, &n); 
}

int main(void){
	int n;
	cin >> n;
	call(n);
	
	return 0;
}

Compiler output:
a.cc: In function 'void check_num(int*, int*, int*)':
a.cc:8:17: error: 'end_check_num' was not declared in this scope; did you mean 'check_num'?
    8 |                 end_check_num(i, x, n);
      |                 ^~~~~~~~~~~~~
      |                 check_num
a.cc: In function 'void includ3(int*, int*, int*)':
a.cc:14:17: error: 'end_check_num' was not declared in this scope; did you mean 'check_num'?
   14 |                 end_check_num(i, x, n);
      |                 ^~~~~~~~~~~~~
      |                 check_num
a.cc:17:16: error: 'include3' was not declared in this scope; did you mean 'includ3'?
   17 |         if(*x) include3(i, x, n);
      |                ^~~~~~~~
      |                includ3
a.cc: In function 'void call(int)':
a.cc:28:9: error: 'include3' was not declared in this scope; did you mean 'includ3'?
   28 |         include3(&i, &x, &n);
      |         ^~~~~~~~
      |         includ3
Language: C++

#include <iostream>
using namespace std;

void check_num(int *i, int *x, int *n);
void include3(int *i, int *x, int *n);
void end_check_num(int *i, int *x, int *n);

void check_num(int *i, int *x, int *n){
	*x = *i;
	if( *x % 3 == 0 ){
		cout << " " << *i;
		end_check_num(i, x, n);	
	}
}
void includ3(int *i, int *x, int *n){
	if( *x % 10 == 3 ){
		cout << " " << *i;
		end_check_num(i, x, n);
	}
	*x /= 10;
	if(*x) include3(i, x, n);
}
void end_chek_num(int *i, int *x, int *n){
	if( ++(*i) <= *n ) check_num(i, x, n);
	cout << endl;
}

void call(int n){
	int i = 1;
	int x = 0;
	check_num(&i, &x, &n);
	include3(&i, &x, &n);
	end_chek_num(&i, &x, &n); 
}

int main(void){
	int n;
	cin >> n;
	call(n);
	
	return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccg4d1g0.o: in function `check_num(int*, int*, int*)':
a.cc:(.text+0x8b): undefined reference to `end_check_num(int*, int*, int*)'
/usr/bin/ld: /tmp/ccg4d1g0.o: in function `includ3(int*, int*, int*)':
a.cc:(.text+0x117): undefined reference to `end_check_num(int*, int*, int*)'
/usr/bin/ld: a.cc:(.text+0x15a): undefined reference to `include3(int*, int*, int*)'
/usr/bin/ld: /tmp/ccg4d1g0.o: in function `call(int)':
a.cc:(.text+0x20f): undefined reference to `include3(int*, int*, int*)'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
using namespace std;

void check_num(int *i, int *x, int *n);
void include3(int *i, int *x, int *n);
void end_check_num(int *i, int *x, int *n);

void call(int n){
	int i = 1;
	int x = 0;
	check_num(&i, &x, &n);
	include3(&i, &x, &n);
	end_chek_num(&i, &x, &n); 
}

int main(void){
	int n;
	cin >> n;
	call(n);
	
	return 0;
}
void check_num(int *i, int *x, int *n){
	*x = *i;
	if( *x % 3 == 0 ){
		cout << " " << *i;
		end_check_num(i, x, n);	
	}
}
void includ3(int *i, int *x, int *n){
	if( *x % 10 == 3 ){
		cout << " " << *i;
		end_check_num(i, x, n);
	}
	*x /= 10;
	if(*x) include3(i, x, n);
}
void end_chek_num(int *i, int *x, int *n){
	if( ++(*i) <= *n ) check_num(i, x, n);
	cout << endl;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:13:9: error: 'end_chek_num' was not declared in this scope; did you mean 'end_check_num'?
   13 |         end_chek_num(&i, &x, &n);
      |         ^~~~~~~~~~~~
      |         end_check_num
Language: C++

#include <iostream>
using namespace std;

void check_num(int *i, int *x, int *n);
void include3(int *i, int *x, int *n);
void end_check_num(int *i, int *x, int *n);

void call(int n){
	int i = 1;
	int x = 0;
	check_num(&i, &x, &n);
	include3(&i, &x, &n);
	end_check_num(&i, &x, &n); 
}

int main(void){
	int n;
	cin >> n;
	call(n);
	
	return 0;
}
void check_num(int *i, int *x, int *n){
	*x = *i;
	if( *x % 3 == 0 ){
		cout << " " << *i;
		end_check_num(i, x, n);	
	}
}
void includ3(int *i, int *x, int *n){
	if( *x % 10 == 3 ){
		cout << " " << *i;
		end_check_num(i, x, n);
	}
	*x /= 10;
	if(*x) include3(i, x, n);
}
void end_chek_num(int *i, int *x, int *n){
	if( ++(*i) <= *n ) check_num(i, x, n);
	cout << endl;
}

Compiler output:
/usr/bin/ld: /tmp/ccghEYJT.o: in function `call(int)':
a.cc:(.text+0x43): undefined reference to `include3(int*, int*, int*)'
/usr/bin/ld: a.cc:(.text+0x5a): undefined reference to `end_check_num(int*, int*, int*)'
/usr/bin/ld: /tmp/ccghEYJT.o: in function `check_num(int*, int*, int*)':
a.cc:(.text+0x11b): undefined reference to `end_check_num(int*, int*, int*)'
/usr/bin/ld: /tmp/ccghEYJT.o: in function `includ3(int*, int*, int*)':
a.cc:(.text+0x1a7): undefined reference to `end_check_num(int*, int*, int*)'
/usr/bin/ld: a.cc:(.text+0x1ea): undefined reference to `include3(int*, int*, int*)'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
using namespace std;

void check_num(int *i, int *x, int *n);
void include3(int *i, int *x, int *n);
void end_check_num(int *i, int *x, int *n);

void call(int n){
	int i = 1;
	int x = 0;
	check_num(&i, &x, &n);
	include3(&i, &x, &n);
	end_check_num(&i, &x, &n); 
}

int main(void){
	int n;
	cin >> n;
	call(n);
	
	return 0;
}
void check_num(int *i, int *x, int *n){
	*x = *i;
	if( *x % 3 == 0 ){
		cout << " " << *i;
		end_check_num(i, x, n);	
	}
}
void include3(int *i, int *x, int *n){
	if( *x % 10 == 3 ){
		cout << " " << *i;
		end_check_num(i, x, n);
	}
	*x /= 10;
	if(*x) include3(i, x, n);
}
void end_chek_num(int *i, int *x, int *n){
	if( ++(*i) <= *n ) check_num(i, x, n);
	cout << endl;
}

Compiler output:
/usr/bin/ld: /tmp/ccYoInJ5.o: in function `call(int)':
a.cc:(.text+0x5a): undefined reference to `end_check_num(int*, int*, int*)'
/usr/bin/ld: /tmp/ccYoInJ5.o: in function `check_num(int*, int*, int*)':
a.cc:(.text+0x11b): undefined reference to `end_check_num(int*, int*, int*)'
/usr/bin/ld: /tmp/ccYoInJ5.o: in function `include3(int*, int*, int*)':
a.cc:(.text+0x1a7): undefined reference to `end_check_num(int*, int*, int*)'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
using namespace std;

void check_num(int *i, int *x, int *n, int *flag);
void include3(int *i, int *x, int *n, int *flag);
void end_check_num(int *i, int *x, int *n, int *flag);

void call(int n){
	int i = 1;
	int x = 0;
	int END_FLAG = 0;
	check_num(&i, &x, &n, &END_FLAG);
	include3(&i, &x, &n, &END_FLAG);
}

int main(void){
	int n;
	cin >> n;
	call(n);
	
	return 0;
}
void check_num(int *i, int *x, int *n, int *flag){
	*x = *i;
	if( *x % 3 == 0 ){
		cout << " " << *i;
		end_check_num(i, x, n, flag);	
	}
}
void include3(int *i, int *x, int *n, int *flag){
	if( *flag != 1 ){
		if( *x % 10 == 3 ){
			cout << " " << *i;
			end_check_num(i, x, n, flag);
		}
		(*x) /= 10;
		if(*x) include3(i, x, n, flag);
	}
}
void end_check_num(int *i, int *x, int *n, int *flag){
	if( ++(*i) <= *n ) check_num(i, x, n);
	cout << endl;
	*flag = 1;
}

Compiler output:
a.cc: In function 'void end_check_num(int*, int*, int*, int*)':
a.cc:41:37: error: too few arguments to function 'void check_num(int*, int*, int*, int*)'
   41 |         if( ++(*i) <= *n ) check_num(i, x, n);
      |                            ~~~~~~~~~^~~~~~~~~
a.cc:23:6: note: declared here
   23 | void check_num(int *i, int *x, int *n, int *flag){
      |      ^~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

void check_num(int *i, int *x, int *n, int *flag);
void include3(int *i, int *x, int *n, int *flag);
void end_check_num(int *i, int *x, int *n, int *flag);

void call(int n){
	int i = 1;
	int x = 0;
	int END_FLAG = 0;
	check_num(&i, &x, &n, &END_FLAG);
}

int main(void){
	int n;
	cin >> n;
	call(n);
	
	return 0;
}
void check_num(int *i, int *x, int *n, int *flag){
	*x = *i;
	if( *x % 3 == 0 ){
		cout << " " << *i;
		end_check_num(i, x, n, flag);	
	}
	else include3(i, x, n, flat);
}
void include3(int *i, int *x, int *n, int *flag){
	if( *flag == 0 ){
		if( *x % 10 == 3 ){
			cout << " " << *i;
			end_check_num(i, x, n, flag);
		}
		else{
			(*x) /= 10;
			if(*x) include3(i, x, n, flag);
			else end_check_num(i, x, n, flag);
		}
	}
}
void end_check_num(int *i, int *x, int *n, int *flag){
	if( ++(*i) <= *n ) check_num(i, x, n, flag);
	else{
		cout << endl;
		*flag = 1;
	}
}

Compiler output:
a.cc: In function 'void check_num(int*, int*, int*, int*)':
a.cc:28:32: error: 'flat' was not declared in this scope; did you mean 'flag'?
   28 |         else include3(i, x, n, flat);
      |                                ^~~~
      |                                flag
Language: C++

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args)throws IOException{
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader reader = new BufferedReader(isr);
		
		int n = Integer.parseInt(reader.readLine());
		
		for(int i = 1; i <= n; i++){
			String string = String.valueOf(i);
			boolean bool = true;
			for(int j = 0; j < string.length(); j++){
				if(string.charAt(j) == '3'){
					System.out.print(" " + i);
					bool = false;
				}
			}
			if(i % 3 == 0 && bool){
				System.out.print(" " + i);
			}
		}
		System.out.print("\n");
		reader.close();
	}
}

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

#include <iostream>
using namespace std;

void check_num(int i){
	x = i;
	if(x % 3 == 0 || x % 10 == 3){
		cout << ' ' << i;
	}
	else{
		x /= 10;
		if(x){
			if(x % 10 == 3) cout << ' ' << i;
		}
	}
}
int main(){
	int n, i = 1;
	cin >> n;
	for(i = 1; i <= n; i++){
		check_num(i);
	}
	cout << endl;
}

Compiler output:
a.cc: In function 'void check_num(int)':
a.cc:5:9: error: 'x' was not declared in this scope
    5 |         x = i;
      |         ^