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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> n;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:9:25: error: 'cout' was not declared in this scope
    9 |                         cout << " " << i;
      |                         ^~~~
a.cc:9:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:41: error: 'cout' was not declared in this scope
   14 |                                         cout << " " << i;
      |                                         ^~~~
a.cc:14:41: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout << endl;
      |         ^~~~
a.cc:21:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:17: error: 'endl' was not declared in this scope
   21 |         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;
Language: C++

#include<iostream>
using namespace std;

bool hasThree( int n ) {
    int findN = 3;
    if (n == 0)
        return false;
    if (n % 10 == findN)
        return true;
    return hasThree( n / 10 );
}

  
int main() {
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) {
        if ((n % 3 = 0) || (hasThree( n ))
            cout << n << ' ';
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: lvalue required as left operand of assignment
   18 |         if ((n % 3 = 0) || (hasThree( n ))
      |              ~~^~~
a.cc:20:5: error: expected primary-expression before '}' token
   20 |     }
      |     ^
a.cc:19:30: error: expected ')' before '}' token
   19 |             cout << n << ' ';
      |                              ^
      |                              )
   20 |     }
      |     ~                         
a.cc:18:12: note: to match this '('
   18 |         if ((n % 3 = 0) || (hasThree( n ))
      |            ^
a.cc:20:5: error: expected primary-expression before '}' token
   20 |     }
      |     ^
Language: C++

#include<iostream>
using namespace std;

bool hasThree( int n ) {
    int findN = 3;
    if (n == 0)
        return false;
    if (n % 10 == findN)
        return true;
    return hasThree( n / 10 );
}

  
int main() {
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) {
        if ((n % 3 = 0) || (hasThree( n )))
            cout << n << ' ';
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: lvalue required as left operand of assignment
   18 |         if ((n % 3 = 0) || (hasThree( n )))
      |              ~~^~~
Language: C++

#include<iostream>
using namespace std;
 
bool hasThree( int n ) {
    int findN = 3;
    if (n == 0)
        return false;
    if (n % 10 == findN)
        return true;
    return hasThree( n / 10 );
}
 
   
int main() {
    int n;
    cin >> n;
    for (int i = 1; i <= n; i++) {
        if (i % 3 = 0)
            cout << i << ' ';
        else if (hasThree( n ))
            cout << i << ' ';
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: lvalue required as left operand of assignment
   18 |         if (i % 3 = 0)
      |             ~~^~~
Language: C++

#include <iostream>

int main()
{
	int n;
	cin >> 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 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> n;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     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:16:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     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:9: 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:17: 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++

#include <iostream>

int main()
{
	int n;
	std::cin >> n;
	int i = 1;
	CHECK_NUM:
	int x = i;
	if ( x % 3 == 0 ){
    std::cout << " " << i;
    goto END_CHECK_NUM;
	}
	INCLUDE3:
	if ( x % 10 == 3 ){
    std::cout << " " << i;
    goto END_CHECK_NUM;
	}
	x /= 10;
	if ( x ) goto INCLUDE3;
	END_CHECK_NUM:
	if ( ++i <= n ) goto CHECK_NUM;
	std::cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   23 |         std::cout << endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'void call(int)':
a.cc:4:7: error: 'cout' was not declared in this scope
    4 |       cout << " " << i;
      |       ^~~~
a.cc:8:7: error: 'cout' was not declared in this scope
    8 |       cout << " " << 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
    if( i % 10 == 3 ) {
      cout << " " << i;
    }
  }
  return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   18 |   return;
      |   ^~~~~~
Language: C++

#define _USE_MATH_DEFINES

#include<math.h>
#include<stdio.h>
#include<utility>
#include<algorithm>

int main() {
	int n, m, l, o, D;
	D = 0;
	m = 1;
	scanf("%d", &n);
	while (m <= n) {
		if (m % 3 == 0) {
			printf("\n%d", m);
		}
		else {
			l = m;
			while (l != 0) {
				o = l % 10;
				if (o == 3) {
					printf(\nd", m);
					break;
				}
				l /= 10;
			}
		}
		m++;
	}
prinf("\n");
	return 0;
}

Compiler output:
a.cc:22:48: error: stray '\' in program
   22 |                                         printf(\nd", m);
      |                                                ^
a.cc:22:51: warning: missing terminating " character
   22 |                                         printf(\nd", m);
      |                                                   ^
a.cc:22:51: error: missing terminating " character
   22 |                                         printf(\nd", m);
      |                                                   ^~~~~~
a.cc: In function 'int main()':
a.cc:22:49: error: 'nd' was not declared in this scope; did you mean 'n'?
   22 |                                         printf(\nd", m);
      |                                                 ^~
      |                                                 n
a.cc:30:1: error: 'prinf' was not declared in this scope; did you mean 'printf'?
   30 | prinf("\n");
      | ^~~~~
      | printf
Language: C++

#include <iostream>


int main() {
	int x,i;

	std::cin >> x;

	int i;

	for (i = 1; i <= x; i++) {
		if (i % 3 == 0) {
			std::cout << " " << i;
		}
		else if (i % 10 == 3) {
			std::cout << " " << i;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: redeclaration of 'int i'
    9 |         int i;
      |             ^
a.cc:5:15: note: 'int i' previously declared here
    5 |         int x,i;
      |               ^
Language: C++

<?php

$line = fgets(STDIN);
$data = explode(" ", rtrim($line));
call($data[0]);

function call(int $n) {
    $i = 1;

    while(1) {
        $x = $i;
        if ($x % 3 == 0) {
            printf(" %d", $i);
        } elseif ($x % 10 == 3) {
            printf(" %d", $i);
        }
        $x /= 10;
        if ($x) {

        }
        if ( ++$i <= $n ) {
            ;
        } else {
            break;
        };
    }
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?php
      | ^
a.cc:4:1: error: '$data' does not name a type
    4 | $data = explode(" ", rtrim($line));
      | ^~~~~
a.cc:5:5: error: expected constructor, destructor, or type conversion before '(' token
    5 | call($data[0]);
      |     ^
a.cc:7:1: error: 'function' does not name a type; did you mean 'union'?
    7 | function call(int $n) {
      | ^~~~~~~~
      | union
Language: C++

#include<stdio.h>

int main() {
	int n;
	int i;

	scanf("%d", &n);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'x' was not declared in this scope
   10 |                 if (x % 3 == 0)printf(" %d", i);
      |                     ^
a.cc:12:29: error: redeclaration of 'int x'
   12 |                         int x = i;
      |                             ^
a.cc:10:21: note: '<typeprefixerror>x' previously declared here
   10 |                 if (x % 3 == 0)printf(" %d", i);
      |                     ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int n, x;

  cin >> n;

  for(int i = 1; i <= n; i++){
    x = i;
    x /= 10;

    if(i % 3 == 0 || i % 10 == 3 || i / 10 == 3) cout << " " << i;

  }

  cout << endl;

  return 0;

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

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected primary-expression before 'for'
    7 |         for (for i = 1; i <= n; i++) {
      |              ^~~
a.cc:7:25: error: 'i' was not declared in this scope
    7 |         for (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++) {
if ( i % 3 ==0 || i % 10 == 3) {
cout << " " << i;
}else {
int p = i;
while(p / 10 != 0){
if (p % 10 == 3) {
cout << " " << i;
break;
}
}}
}} cout << endl;

return 0;
}


Compiler output:
a.cc:18:4: error: 'cout' does not name a type
   18 | }} cout << endl;
      |    ^~~~
a.cc:20:1: error: expected unqualified-id before 'return'
   20 | return 0;
      | ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

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

return 0;
}


Compiler output:
a.cc:18:4: error: 'cout' does not name a type
   18 | }} cout << endl;
      |    ^~~~
a.cc:20:1: error: expected unqualified-id before 'return'
   20 | return 0;
      | ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++

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


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

#include <bits/stdc++.h>

int main(){
    int n ,i = 1;
    scanf("%d",&n);
    do{
        int x = i
        if(x%3==0){
            putchar(' ');
        }else{
            do{
                if(x%10 == 3){
                    putchar(' ');
                    break;
                } 
                x/= 10;
            }while(x);
        }
    }while(++i<=n);
    putchar('\n');
    return 0;
}



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

void call2(int n)
{
	int i = 1;
	while(i <= n)
	{
		int x = i;
		while (x)
		{

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

		}
		i++;
	}
	cout << endl;
}
int main()
{
	int n;
	cin >> n;
	call2(60);
	return 0;
}


Compiler output:
a.cc: In function 'void call2(int)':
a.cc:12:33: error: 'cout' was not declared in this scope
   12 |                                 cout << " " << i;
      |                                 ^~~~
a.cc:17:33: error: 'cout' was not declared in this scope
   17 |                                 cout << " " << i;
      |                                 ^~~~
a.cc:25:9: error: 'cout' was not declared in this scope
   25 |         cout << endl;
      |         ^~~~
a.cc:25:17: error: 'endl' was not declared in this scope
   25 |         cout << endl;
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:30:9: error: 'cin' was not declared in this scope
   30 |         cin >> n;
      |         ^~~
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'else' without a previous 'if'
   10 |                 else{
      |                 ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    int n;

    cin >> n;
    for(i=0;i<=n;i++){
        if(i%3==0 || i%10==3){
            cout << i << " ";
        }
    }
    cout << endl;
    return 0;
}


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

	int i = 1;
	while (++i <= n) {
		int x = i;
		if (x % 3 == 0) {
			std::cout << " " << i;
			continue;
		}

		while (x) {
			if (x % 10 == 3) {
				std::cout << " " << i;
				break;
			}
			x /= 10;
		}
	}
	std::cout << std::endl;



Compiler output:
a.cc:2:9: error: expected unqualified-id before 'while'
    2 |         while (++i <= n) {
      |         ^~~~~
a.cc:17:14: error: 'cout' in namespace 'std' does not name a type
   17 |         std::cout << std::endl;
      |              ^~~~
a.cc:1:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 |         int i = 1;
Language: C++

#include <iostream>

void call (int n)
{
	int i = 1;
	while (++i <= n) {
		int x = i;
		if (x % 3 == 0) {
			std::cout << " " << i;
			continue;
		}

		while (x) {
			if (x % 10 == 3) {
				std::cout << " " << i;
				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 <stdio.h>
#include <iostream>

void call(int n)
{
	int i = 1;
	while (++i <= n) {
		int x = i;
		if (x % 3 == 0) {
			std::cout << " " << i;
			continue;
		}

		while (x) {
			if (x % 10 == 3) {
				std::cout << " " << i;
				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++

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

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



Compiler output:
a.cc: In function 'void call(int)':
a.cc:7:25: error: 'cout' was not declared in this scope
    7 |                         cout << " " << i;
      |                         ^~~~
a.cc:13:33: error: 'cout' was not declared in this scope
   13 |                                 cout << " " << i;
      |                                 ^~~~
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout << endl;
      |         ^~~~
a.cc:19:17: error: 'endl' was not declared in this scope
   19 |         cout << endl;
      |                 ^~~~
Language: C++

void call(int n)
{
	int i = 1;
	while (++i <= n) {
		int x = i;
		if (x % 3 == 0) {
			std::cout << " " << i;
			continue;
		}

		while (x) {
			if (x % 10 == 3) {
				std::cout << " " << i;
				break;
			}
			x /= 10;
		}
	}
	std::cout << std::endl;
}



Compiler output:
a.cc: In function 'void call(int)':
a.cc:7:30: error: 'cout' is not a member of 'std'
    7 |                         std::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 | 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:14: error: 'cout' is not a member of 'std'
   19 |         std::cout << std::endl;
      |              ^~~~
a.cc:19:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:27: error: 'endl' is not a member of 'std'
   19 |         std::cout << std::endl;
      |                           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | void call(int n)
Language: C++

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

		while (x) {
			if (x % 10 == 3) {
				std::cout << " " << i;
				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++

int main(void) {

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

	int i = 1;
	while (++i <= n) {
		int x = i;
		if (x % 3 == 0) {
			std::cout << " " << i;
			continue;
		}

		while (x) {
			if (x % 10 == 3) {
				std::cout << " " << i;
				break;
			}
			x /= 10;
		}
	}
	std::cout << std::endl;

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'scanf' was not declared in this scope
    4 |         scanf("%d", n);
      |         ^~~~~
a.cc:10:30: error: 'cout' is not a member of 'std'
   10 |                         std::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 | int main(void) {
a.cc:16:38: error: 'cout' is not a member of 'std'
   16 |                                 std::cout << " " << i;
      |                                      ^~~~
a.cc:16:38: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:14: error: 'cout' is not a member of 'std'
   22 |         std::cout << std::endl;
      |              ^~~~
a.cc:22:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:27: error: 'endl' is not a member of 'std'
   22 |         std::cout << std::endl;
      |                           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main(void) {
Language: C++

//hello.cpp
#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;
}


Compiler output:
a.cc:6:1: error: expected initializer before 'void'
    6 | void call(int n){
      | ^~~~
Language: C++

void call(int n){
  while(1){
  int i = 1,f=1;
 if(f==1){
  int x = i;
  if ( x % 3 == 0 ){
    cout << " " << i;
    f=3;
  }
 }
 if(f==2){
  if ( x % 10 == 3 ){
    cout << " " << i;
    f=3;
  }
  x /= 10;
  if ( x ){f=2;}
 if(f==3){
  if ( ++i <= n ){f=1;}

  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:8: error: 'x' was not declared in this scope
   12 |   if ( x % 10 == 3 ){
      |        ^
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << " " << i;
      |     ^~~~
a.cc:16:3: error: 'x' was not declared in this scope
   16 |   x /= 10;
      |   ^
a.cc:21:3: error: 'cout' was not declared in this scope
   21 |   cout << endl;
      |   ^~~~
a.cc:21:11: error: 'endl' was not declared in this scope
   21 |   cout << endl;
      |           ^~~~
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:2:11: note: to match this '{'
    2 |   while(1){
      |           ^
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:1:17: note: to match this '{'
    1 | void call(int n){
      |                 ^
Language: C++

void call(int n){
  while(1){
  int i = 1,f=1;
 if(f==1){
  int x = i;
  if ( x % 3 == 0 ){
    cout << " " << i;
    f=3;
  }
 }
 if(f==2){
  if ( x % 10 == 3 ){
    cout << " " << i;
    f=3;
  }
  x /= 10;
  if ( x ){f=2;}
 }
 if(f==3){
  if ( ++i <= n ){f=1;}

  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:8: error: 'x' was not declared in this scope
   12 |   if ( x % 10 == 3 ){
      |        ^
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << " " << i;
      |     ^~~~
a.cc:16:3: error: 'x' was not declared in this scope
   16 |   x /= 10;
      |   ^
a.cc:22:3: error: 'cout' was not declared in this scope
   22 |   cout << endl;
      |   ^~~~
a.cc:22:11: error: 'endl' was not declared in this scope
   22 |   cout << endl;
      |           ^~~~
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:1:17: note: to match this '{'
    1 | void call(int n){
      |                 ^
Language: C++

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

  cout << endl;
 }
}


Compiler output:
a.cc: In function 'void call(int)':
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout << " " << i;
      |     ^~~~
a.cc:14:8: error: 'x' was not declared in this scope
   14 |   if ( x % 10 == 3 ){
      |        ^
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << " " << i;
      |     ^~~~
a.cc:18:3: error: 'x' was not declared in this scope
   18 |   x /= 10;
      |   ^
a.cc:24:3: error: 'cout' was not declared in this scope
   24 |   cout << endl;
      |   ^~~~
a.cc:24:11: error: 'endl' was not declared in this scope
   24 |   cout << endl;
      |           ^~~~
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:1:17: note: to match this '{'
    1 | void call(int n){
      |                 ^
Language: C++

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

  cout << endl;
 }
}


Compiler output:
a.cc: In function 'void call(int)':
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout << " " << i;
      |     ^~~~
a.cc:14:8: error: 'x' was not declared in this scope
   14 |   if ( x % 10 == 3 ){
      |        ^
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << " " << i;
      |     ^~~~
a.cc:18:3: error: 'x' was not declared in this scope
   18 |   x /= 10;
      |   ^
a.cc:28:3: error: 'cout' was not declared in this scope
   28 |   cout << endl;
      |   ^~~~
a.cc:28:11: error: 'endl' was not declared in this scope
   28 |   cout << endl;
      |           ^~~~
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:1:17: note: to match this '{'
    1 | void call(int n){
      |                 ^
Language: C++

#include<cstdio>
using namespace std;
int main(){
    int n,x,i=1;
    scanf("%d",&n)
    while(1){
        x=i;
        if(x%3==0){
            cout<<" "<<i;
        }else if(x%10==3){
            cout<<" "<<i;
        }
        
        if(++i>n){
            break;
        }
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: expected ';' before 'while'
    5 |     scanf("%d",&n)
      |                   ^
      |                   ;
    6 |     while(1){
      |     ~~~~~
Language: C++

#include<cstdio>
using namespace std;
int main(){
    int n,x,i=1;
    scanf("%d",&n);
    while(1){
        x=i;
        if(x%3==0){
            cout<<" "<<i;
        }else if(x%10==3){
            cout<<" "<<i;
        }
        
        if(++i>n){
            break;
        }
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'cout' was not declared in this scope
    9 |             cout<<" "<<i;
      |             ^~~~
a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<cstdio>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:11:13: error: 'cout' was not declared in this scope
   11 |             cout<<" "<<i;
      |             ^~~~
a.cc:11:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<cstdio>
using namespace std;
int main(){
    int n,x,i=1;
    scanf("%d",&n);
    while(1){
        x=i;
        if(x%3==0){
            cout<<" "<<i;
        }
        while(x){
            if(x%10==3){
                cout<<" "<<i;
            }

            if(++i>n){
                break;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'cout' was not declared in this scope
    9 |             cout<<" "<<i;
      |             ^~~~
a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<cstdio>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:13:17: error: 'cout' was not declared in this scope
   13 |                 cout<<" "<<i;
      |                 ^~~~
a.cc:13:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<cstdio>
using namespace std;
int main(){
    int n,x;
    int i=1;
    scanf("%d",&n);
    while(1){
        x=i;
        if(x%3==0){
            cout<<" "<<i;
        }
        while(x){
            if(x%10==3){
                cout<<" "<<i;
            }
            if(++i>n){
                break;
            }
        }
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'cout' was not declared in this scope
   10 |             cout<<" "<<i;
      |             ^~~~
a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<cstdio>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:14:17: error: 'cout' was not declared in this scope
   14 |                 cout<<" "<<i;
      |                 ^~~~
a.cc:14:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
using namespace std;


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

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

				x /= 10;
			}
		}
	}

	cout << "\n";

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

				x /= 10;
			}
		}
	}

	cout << "\n";

    return 0;
}



Compiler output:
a.cc:37:5: error: redefinition of 'int main()'
   37 | int main()
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main()
      |     ^~~~
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>
#include<math.h>
#include<utility>
#include<map>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef pair<ll,ll> P;
typedef vector<P> vp;
#define REP(i,n) for(ll i=0;i<n;i++)
#define FOR(i,m,n) for(ll i=m;i<n;i++)
#define REPR(i,n) for(ll i=n-1;i>=0;i--)
#define FORR(i,n,m) for(ll i=n-1;i>=m;i--)
#define all(in) in.begin(),in.end()
#define ALL(in,K) in,in+K
#define INF 100000000
#define MOD 100000007
#define SIZE 100005
#define pi 	3.14159265358979323846

int main(){
	ll n;
	cin >> n;
	n++;
	FOR(i,0,n){
		if((i%3==2||i%10==1){
			cout << i+1 << " ";
		}
	}cout << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:37: error: expected ')' before '{' token
   33 |                 if((i%3==2||i%10==1){
      |                   ~                 ^
      |                                     )
a.cc:36:9: error: expected primary-expression before '}' token
   36 |         }cout << endl;
      |         ^
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>
#include<math.h>
#include<utility>
#include<map>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef pair<ll,ll> P;
typedef vector<P> vp;
#define REP(i,n) for(ll i=0;i<n;i++)
#define FOR(i,m,n) for(ll i=m;i<n;i++)
#define REPR(i,n) for(ll i=n-1;i>=0;i--)
#define FORR(i,n,m) for(ll i=n-1;i>=m;i--)
#define all(in) in.begin(),in.end()
#define ALL(in,K) in,in+K
#define INF 100000000
#define MOD 100000007
#define SIZE 100005
#define pi 	3.14159265358979323846

int main(){
	ll n;
	cin >> n;
	n++;
	ll  = x;
	FOR(i,1,n+1){
		if(i%10==3 && i%3==0){
			cout << " " << i;
		}
	}
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:13: error: expected unqualified-id before '=' token
   32 |         ll  = x;
      |             ^
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;
		while(x != 0){
			if(x % 10 == 3) cout << " " << i;
			x /= 10;
		}
	}
	cout << endl;
	return 0;
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | }#include <iostream>
      |  ^
a.cc:1:1: error: expected declaration before '}' token
    1 | }#include <iostream>
      | ^
a.cc:1:3: error: 'include' does not name a type
    1 | }#include <iostream>
      |   ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:13: error: expected initializer before '>>' token
    6 |         cin >> n;
      |             ^~
a.cc:9:32: error: 'cout' was not declared in this scope
    9 |                 if(x % 3 == 0) cout << " " << i;
      |                                ^~~~
a.cc:11:41: error: 'cout' was not declared in this scope
   11 |                         if(x % 10 == 3) cout << " " << i;
      |                                         ^~~~
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout << endl;
      |         ^~~~
a.cc:15:17: error: 'endl' was not declared in this scope
   15 |         cout << endl;
      |                 ^~~~
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;
		while(x != 0){
			if(x % 10 == 3) cout << " " << i;
			x /= 10;
		}
	}
	cout << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected initializer before '>>' token
    6 |         cin >> n;
      |             ^~
Language: C++

#include<bits/stdc++>
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:1:9: fatal error: bits/stdc++: No such file or directory
    1 | #include<bits/stdc++>
      |         ^~~~~~~~~~~~~
compilation terminated.
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:25:14: error: expected '}' at end of input
   25 |     return 0;
      |              ^
a.cc:3:11: note: to match this '{'
    3 | 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;
        break;
        
    }
    x/=10;
    if(x==0) break;
}
   if(++i > n) break;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'x' was not declared in this scope
   12 |     if(x%3 == 0){
      |        ^
a.cc:14:9: error: break statement not within loop or switch
   14 |         break;
      |         ^~~~~
a.cc:17:5: error: 'x' was not declared in this scope
   17 |     x/=10;
      |     ^
a.cc:18:14: error: break statement not within loop or switch
   18 |     if(x==0) break;
      |              ^~~~~
a.cc: At global scope:
a.cc:20:4: error: expected unqualified-id before 'if'
   20 |    if(++i > n) break;
      |    ^~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
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;
        break;
        
    }
    x/=10;
    if(x==0) break;
}
}
   if(++i > n) break;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'x' was not declared in this scope
   12 |     if(x%3 == 0){
      |        ^
a.cc:14:9: error: break statement not within loop or switch
   14 |         break;
      |         ^~~~~
a.cc:17:5: error: 'x' was not declared in this scope
   17 |     x/=10;
      |     ^
a.cc:18:14: error: break statement not within loop or switch
   18 |     if(x==0) break;
      |              ^~~~~
a.cc: At global scope:
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
a.cc:21:4: error: expected unqualified-id before 'if'
   21 |    if(++i > n) break;
      |    ^~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
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:12:8: error: 'x' was not declared in this scope
   12 |     if(x%3 == 0){
      |        ^
a.cc:25:16: error: break statement not within loop or switch
   25 |     if(++i >n) break;
      |                ^~~~~
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:26:2: error: expected '}' at end of input
   26 | }
      |  ^
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;
cout<<" ";

	for(int i=1;i<=n;i++){
	if(i%3==0){cout<<i;}
	else if(i%10==3){cout<<i;}
        int g=i%100
        else if(g<40){if(30<=g){cout<<i;}}
	if(i%3==0||i%10==3){if(i<n){
cout<<" ";}}
	}

cout<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected ',' or ';' before 'else'
   13 |         else if(g<40){if(30<=g){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;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
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;
cout<<" ";

	for(int i=1;i<=n;i++){
	if(i%3==0){cout<<i;}
	else if(i%10==3){cout<<i;}
        int g=i%100
        else if(g<40&&30<=g)cout<<i;}
	if(i%3==0||i%10==3){if(i<n){
cout<<" ";}}
	}

cout<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected ',' or ';' before 'else'
   13 |         else if(g<40&&30<=g)cout<<i;}
      |         ^~~~
a.cc:14:12: error: 'i' was not declared in this scope
   14 |         if(i%3==0||i%10==3){if(i<n){
      |            ^
a.cc: At global scope:
a.cc:18:1: error: 'cout' does not name a type
   18 | cout<<endl;
      | ^~~~
a.cc:19:1: error: expected unqualified-id before 'return'
   19 | return 0;
      | ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

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

int main(){
int n;
cin>>n;
cout<<" ";

	for(int i=1;i<=n;i++){
	if(i%3==0){cout<<i;}
	else if(i%10==3){cout<<i;}
        int g=i%100
        else if(g<40&&30<=g){cout<<i;}
	if(i%3==0||i%10==3){if(i<n){
cout<<" ";}}
	}

cout<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected ',' or ';' before 'else'
   13 |         else if(g<40&&30<=g){cout<<i;}
      |         ^~~~
Language: C++

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

int main(){
int n;
cin>>n;
cout<<" ";

	for(int i=1;i<=n;i++){
	if(i%3==0){cout<<i;}
	else if(i%10==3){cout<<i;}
        int g=(i%100)
        else if(g<40 && 30<=g){cout<<i;}
	if(i%3==0||i%10==3){if(i<n){
cout<<" ";}}
	}

cout<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected ',' or ';' before 'else'
   13 |         else if(g<40 && 30<=g){cout<<i;}
      |         ^~~~
Language: C++

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

int main(){
int n;
cin>>n;
int g,l;
	for(int i=1;i<=n;i++){
	g=i%100;
	l=i%1000;
	m=i%10000;
	if(i%3==0){cout<<" "<<i;}
	else if(i%10==3){cout<<" "<<i;}
	if(30<=g && g<40 || 300<=l && l<400 || 3000<=l && l<4000){if(i%3!=0 && i%10!=3){cout<<" "<<i;}}
	}

cout<<endl;
return 0;
}


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

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

int main(){
int n;
cin>>n;
int g,l;
	for(int i=1;i<=n;i++){
	g=i%100;
	l=i%1000;
	m=i%10000;
	if(i%3==0){cout<<" "<<i;}
	else if(i%10==3){cout<<" "<<i;}
	if(30<=g && g<40 || 300<=l && l<400 || 3000<=m && m<4000){if(i%3!=0 && i%10!=3){cout<<" "<<i;}}
	}

cout<<endl;
return 0;
}


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

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

int main(){
int n;
cin>>n;
int g,l;
	for(int i=1;i<=n;i++){
	g=i%100;
	l=i%1000;
	m=i%10000;
if(3000<=m&&m<4000){g=m/100;}
if(300<=l&&l<400){g=l/10;}
	if(i%3==0){cout<<" "<<i;}
	else if(i%10==3){cout<<" "<<i;}
	if(30<=g && g<40 && i%3!=0 && i%10!=3){cout<<" "<<i;}
	}

cout<<endl;
return 0;
}


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

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

int main(){
int n;
cin>>n;
int g,l;
	for(int i=1;i<=n;i++){
	g=i%100;
	l=i%1000;
	m=i%10000;
if(3000<=m && m<4000){g=m/100;}
if(300<=l && l<400){g=l/10;}
	if(i%3==0){cout<<" "<<i;}
	else if(i%10==3){cout<<" "<<i;}
	if(30<=g && g<40 && i%3!=0 && i%10!=3){cout<<" "<<i;}
	}

cout<<endl;
return 0;
}


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

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

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

    int i;
    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)
      |     ^~~~