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

#define _USE_MATH_DEFINES 
#include <cmath>
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<string>
#define rep(i,start,n) for(int i=start;i<n;i++)
#define And &&
#define Or ||
#define Lb cout<<endl
using namespace std;

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

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

//x??????????????°??§????????¨??????????????????
//????????????????????????????????´??°???????????¨??????????????????
//????????????????????????
#include<iostream>
using namespace std;

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

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

#include<bits/stdc++.h>

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:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout << " " << i;
      |     ^~~~
      |     std::cout
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:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |   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:21:11: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   21 |   cout << endl;
      |           ^~~~
      |           std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: 'x' was not declared in this scope
    6 |                 cin >> x;
      |                        ^
a.cc:8:25: error: 'y' was not declared in this scope
    8 |                         y = i;
      |                         ^
Language: C++

#include<iostream>
using namespace std;

int main(){
 int i = 1;

 while(++i <= n){
  int x = i;

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

 cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'n' was not declared in this scope
    7 |  while(++i <= n){
      |               ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
 int n,i = 1;

 while(++i <= n){
  int x = i;

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

 cout << endl;
}

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

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

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

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

#include <cstdio>
int main(){
 int n,i,x;
 i=1;
 do {
  x=i;
  if(x%3==0){
   cout << " " << i;
  } else do {
   if ( x%10 == 3 ) {
      cout << " " << i;
      x=0; 
  } while (x/=10,x);
 } while (++i <= n);
 cout << endl;
};

   
    

Compiler output:
a.cc: In function 'int main()':
a.cc:8:4: error: 'cout' was not declared in this scope
    8 |    cout << " " << i;
      |    ^~~~
a.cc:11:7: error: 'cout' was not declared in this scope
   11 |       cout << " " << i;
      |       ^~~~
a.cc:15:2: error: 'cout' was not declared in this scope
   15 |  cout << endl;
      |  ^~~~
a.cc:15:10: error: 'endl' was not declared in this scope
   15 |  cout << endl;
      |          ^~~~
a.cc:16:2: error: expected 'while' before ';' token
   16 | };
      |  ^
a.cc:16:2: error: expected '(' before ';' token
   16 | };
      |  ^
      |  (
a.cc:16:2: error: expected primary-expression before ';' token
a.cc:16:2: error: expected ')' before ';' token
   16 | };
      |  ^
      |  )
a.cc:16:3: error: expected '}' at end of input
   16 | };
      |   ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

#include <cstdio>
#include <stream>
int main(){
 int n,i,x;
 i=1;
 do {
  x=i;
  if(x%3==0){
   cout << " " << i;
  } else do {
   if ( x%10 == 3 ) {
      cout << " " << i;
      x=0; 
   } 
  } while (x/=10,x);
 } while (++i <= n);
 cout << endl;
};

   
    

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

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

   
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |    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:12:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |       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:17:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |  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:17:10: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |  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>
#include<iomanip>
using namespace std;

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

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

#include<iostream>
#include<cstdio>
using namespace std;
#define nMAX 10000

int main(void)
{ 
    int n;
    int i = 1,x = 1;

    do{
        cin >> n;
    }while(n < 3;n > nMAX);
 
    while(x % 3 == 0){
        cout << " " << i;
        if(++i <= n)break;
    }
    while(x % 10 == 0){
        cout << " " << i;
        x /= 10;
        if(!x) break;
    }

    cout << endl;
 
    return 0;
}

    

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: expected ')' before ';' token
   13 |     }while(n < 3;n > nMAX);
      |           ~     ^
      |                 )
a.cc:13:26: error: expected ';' before ')' token
   13 |     }while(n < 3;n > nMAX);
      |                          ^
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
#define nMAX 10000

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

    do{
        cin >> n;
    }while(n < 3;n > nMAX);

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

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

    }while(i++ != n);

    cout << endl;
    
    return 0;
}

    

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: expected ')' before ';' token
   13 |     }while(n < 3;n > nMAX);
      |           ~     ^
      |                 )
a.cc:13:26: error: expected ';' before ')' token
   13 |     }while(n < 3;n > nMAX);
      |                          ^
Language: C++

#include <iostream>
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<<" ";
        }
    }
    cout<<endl;
    return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected ';' before '}' token
   15 |     return 0
      |             ^
      |             ;
   16 | }
      | ~
Language: C++

#include<iostream>

using namespace std;

/* ??????????????°?????????true

	*/

bool has( 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 'void call(int)':
a.cc:27:36: error: 'has3' was not declared in this scope; did you mean 'has'?
   27 |                 if ( x % 3 == 0 || has3(x) ){
      |                                    ^~~~
      |                                    has
Language: C++

#include<iostream>

using namespace std;

/* ??????????????°?????????true

	*/

bool has( 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 'void call(int)':
a.cc:27:36: error: 'has3' was not declared in this scope; did you mean 'has'?
   27 |                 if ( x % 3 == 0 || has3 (x) ){
      |                                    ^~~~
      |                                    has
Language: C++

#include<iostream>
#include<vector>

int main()
{
	int n;
	std::cin >> n;
	std::vector<int> vec(n);

	for (int i = 0; i <= vec.size(); i++) {
		if (i % 3 == 0) {
			std::cout << " " << i;
			continue;
		}
		int j = i;
		while (j > 0) {
			if (j % 10 == 3)c {
				std::cout << " " << i;
				break;
			}
			else
				j /= 10;
		}
	}
	std::cout << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:41: error: 'c' was not declared in this scope
   17 |                         if (j % 10 == 3)c {
      |                                         ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:5:21: note: to match this '{'
    5 | for( i=0; i<n; ++i) {
      |                     ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:2:16: note: to match this '{'
    2 | int main(void) {
      |                ^
Language: C++

#include <iostream>
using namespace std;

int i = 1, x, _n;
bool finish = false;

void checkNum();
void include3();
void endCheckNum();

void checkNum()
{
  x = i;
  if ( x % 3 == 0 ){
    cout << " " << i;
    endCheckNum();
  }
  
}

void include3()
{
  if(finish) return;
  if ( x % 10 == 3 ){
    cout << " " << i;
    endCheckNum();
  }
  x /= 10;
  if ( x ) include3();
}

void endCheckNum()
{
  if ( ++i <= _n ) checkNum();
  else finish = true;
}

void call(int n)
{
  _n = n;
  while(!finish) {
    checkNum();
    include3();
    endCheckNum();
  }
}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:50:10: error: 'n' was not declared in this scope
   50 |   cin >> n;
      |          ^
Language: C++

#include<iostream>
using namespace std;


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

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

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

#include <iostream>
using namespace std;

int main(){
	int i = 1;
	bool check;

	while (++i <= n){
		check = false;
		int x = i;

		if (x % 3 == 0){
			cout << " " << i;
			check = true;
		}

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

	return 0;
}

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

#include <iostream>
using namespace std;

int main(){
	int n;

	cin >> n;

	for (int i = 1; i < n;i++){
		check = false;
		int x = i;

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

		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:10:17: error: 'check' was not declared in this scope
   10 |                 check = false;
      |                 ^~~~~
Language: C++

import java.util.*;

 
class 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:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:25:2: error: expected ';' after class definition
   25 | }
      |  ^
      |  ;
a.cc: In member function 'void Main::call(int)':
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout << " " << i;
      |     ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << " " << i;
      |     ^~~~
a.cc:23:3: error: 'cout' was not declared in this scope
   23 |   cout << endl;
      |   ^~~~
a.cc:23:11: error: 'endl' was not declared in this scope
   23 |   cout << endl;
      |           ^~~~
Language: C++

n = gets.to_i
s = ""
(1...(n + 1)).each do |i|
  x = i
  if (x % 3 == 0)
    s += " #{i}"
  else
    loop do
      if ( x % 10 == 3)
	s += " #{i}"
	break
      else
	x /= 10
	break if x
      end
    end
  end
end
puts s

Compiler output:
a.cc:3:2: error: too many decimal points in number
    3 | (1...(n + 1)).each do |i|
      |  ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = gets.to_i
      | ^
Language: C++

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

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

Compiler output:
a.cc:1:4: error: stray '#' in program
    1 | ???#include <iostream>
      |    ^
a.cc:1:1: error: expected unqualified-id before '?' token
    1 | ???#include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> n;
      |         ^~~
a.cc:15:25: error: 'cout' was not declared in this scope
   15 |                         cout << " " << i;
      |                         ^~~~
a.cc:19:25: error: 'cout' was not declared in this scope
   19 |                         cout << " " << i;
      |                         ^~~~
a.cc:23:9: error: 'cout' was not declared in this scope
   23 |         cout << endl;
      |         ^~~~
a.cc:23:17: error: 'endl' was not declared in this scope
   23 |         cout << endl;
      |                 ^~~~
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;
    }
  }
  count << endl;
  return 0;
}

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

#include <iostream>
using namespace std;
   
int main() {
  int n;
  cin >> n;
  call(n);
  return 0;
}

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

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

 #include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'con' was not declared in this scope
    8 |         con >> n ;
      |         ^~~
a.cc:22:17: error: 'c' was not declared in this scope
   22 |                 c = x /= 10;
      |                 ^
Language: C++

  #include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: 'c' was not declared in this scope
   22 |                 c = x /= 10;
      |                 ^
Language: C++

#include<iostream>
using namespace std;

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

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

#include<iostream>
using namespace std;

int main(){
   int N;
   int temp;
   for(int i = 1;i <= N;i++){
       temp = i/10;
       if(i%3 == 0){
           cout << " " << i;
       }else if(i%10 == 3){
           cout << " " << i;
       }else{
           while(){
               if(temp%3 == 0) cout << " " << i;
               temp /=10;
               if(temp < 3) break;
       }
   }
   }
   cout << endl;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: expected primary-expression before ')' token
   14 |            while(){
      |                  ^
Language: C++

#include <stdio.h>

int main(int argc, char **argv)
{
	int n;
    cin>>n;
    for(int i=1;i<=n;i++){
        if(i%3==0||1%10==3){
            cout<<' '<<i;
        }
    }
    cout<<endl;
	return 0;
}

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

??? #include <iostream>
using namespace std;
int main()
{
	int n, i, x, c;

	cin >> n;
	i = 1;

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

Compiler output:
a.cc:1:5: error: stray '#' in program
    1 | ??? #include <iostream>
      |     ^
a.cc:1:1: error: expected unqualified-id before '?' token
    1 | ??? #include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> n;
      |         ^~~
a.cc:15:25: error: 'cout' was not declared in this scope
   15 |                         cout << " " << i;
      |                         ^~~~
a.cc:19:25: error: 'cout' was not declared in this scope
   19 |                         cout << " " << i;
      |                         ^~~~
a.cc:26:25: error: 'cout' was not declared in this scope
   26 |                         cout << " " << i;
      |                         ^~~~
a.cc:30:8: error: 'cout' was not declared in this scope
   30 |        cout << endl ;
      |        ^~~~
a.cc:30:16: error: 'endl' was not declared in this scope
   30 |        cout << endl ;
      |                ^~~~
Language: C++

???#include <iostream>
using namespace std;
int main()
{
	int n, i, x, c;

	cin >> n;
	i = 1;
	3 <= n <= 10000;

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

Compiler output:
a.cc:1:4: error: stray '#' in program
    1 | ???#include <iostream>
      |    ^
a.cc:1:1: error: expected unqualified-id before '?' token
    1 | ???#include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> n;
      |         ^~~
a.cc:17:25: error: 'cout' was not declared in this scope
   17 |                         cout << " " << i;
      |                         ^~~~
a.cc:21:25: error: 'cout' was not declared in this scope
   21 |                         cout << " " << i;
      |                         ^~~~
a.cc:28:25: error: 'cout' was not declared in this scope
   28 |                         cout << " " << i;
      |                         ^~~~
a.cc:31:9: error: 'cout' was not declared in this scope
   31 |         cout << endl;
      |         ^~~~
a.cc:31:17: error: 'endl' was not declared in this scope
   31 |         cout << endl;
      |                 ^~~~
Language: C++

???#include <iostream>
using namespace std;
int main()
{
	int n, i, x, c;

	cin >> n;
	i = 1 ;
	3 <= n <= 10000;

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

Compiler output:
a.cc:1:4: error: stray '#' in program
    1 | ???#include <iostream>
      |    ^
a.cc:1:1: error: expected unqualified-id before '?' token
    1 | ???#include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> n;
      |         ^~~
a.cc:17:25: error: 'cout' was not declared in this scope
   17 |                         cout << " " << i;
      |                         ^~~~
a.cc:21:25: error: 'cout' was not declared in this scope
   21 |                         cout << " " << i;
      |                         ^~~~
a.cc:28:25: error: 'cout' was not declared in this scope
   28 |                         cout << " " << i;
      |                         ^~~~
a.cc:31:9: error: 'cout' was not declared in this scope
   31 |         cout << endl;
      |         ^~~~
a.cc:31:17: error: 'endl' was not declared in this scope
   31 |         cout << endl;
      |                 ^~~~
Language: C++

???#include <iostream>
using namespace std;
int main()
{
	int n, i, x, c, d;

	cin >> n;
	i = 1 ;
	3 <= n <= 10000;

	while (i <= n - 1)
	{
		i ++ ;
		x = i;
		if (x % 3 == 0 )
		{
			cout << " " << i;
		}
		else if (x % 10 == 3)
		{
			cout << " " << i;
		}
		else
			c = x;
		c = c / 10;
		if (c % 10 == 3)
		{
			cout << " " << i;
		}
		d = x;
		d = d / 100;
		if (d % 10 == 3)
		{
			cout << " " << i;
		}
	}
	cout << endl;
}

Compiler output:
a.cc:1:4: error: stray '#' in program
    1 | ???#include <iostream>
      |    ^
a.cc:1:1: error: expected unqualified-id before '?' token
    1 | ???#include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> n;
      |         ^~~
a.cc:17:25: error: 'cout' was not declared in this scope
   17 |                         cout << " " << i;
      |                         ^~~~
a.cc:21:25: error: 'cout' was not declared in this scope
   21 |                         cout << " " << i;
      |                         ^~~~
a.cc:28:25: error: 'cout' was not declared in this scope
   28 |                         cout << " " << i;
      |                         ^~~~
a.cc:34:25: error: 'cout' was not declared in this scope
   34 |                         cout << " " << i;
      |                         ^~~~
a.cc:37:9: error: 'cout' was not declared in this scope
   37 |         cout << endl;
      |         ^~~~
a.cc:37:17: error: 'endl' was not declared in this scope
   37 |         cout << endl;
      |                 ^~~~
Language: C++

???#include <iostream>
using namespace std;
int main()
{
	int n, i, x, c, d;

	cin >> n;
	i = 1 ;
	3 <= n <= 10000;

	while (i <= n - 1)
	{
		i ++ ;
		x = i;
		c = x;
		d = x ;
		if (x % 3 == 0 )
		{
			cout << " " << i;
		}
		else if (x % 10 == 3)
		{
			cout << " " << i;
		}
		else if ( ( c / 10 ) % 10 == 3 )
		{
			cout << " " << i;
		}
		else if ( ( d / 100 ) % 10 == 3 )
		{
			cout << " " << i; 
		}
	}
	cout << endl;
}

Compiler output:
a.cc:1:4: error: stray '#' in program
    1 | ???#include <iostream>
      |    ^
a.cc:1:1: error: expected unqualified-id before '?' token
    1 | ???#include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> n;
      |         ^~~
a.cc:19:25: error: 'cout' was not declared in this scope
   19 |                         cout << " " << i;
      |                         ^~~~
a.cc:23:25: error: 'cout' was not declared in this scope
   23 |                         cout << " " << i;
      |                         ^~~~
a.cc:27:25: error: 'cout' was not declared in this scope
   27 |                         cout << " " << i;
      |                         ^~~~
a.cc:31:25: error: 'cout' was not declared in this scope
   31 |                         cout << " " << i;
      |                         ^~~~
a.cc:34:9: error: 'cout' was not declared in this scope
   34 |         cout << endl;
      |         ^~~~
a.cc:34:17: error: 'endl' was not declared in this scope
   34 |         cout << endl;
      |                 ^~~~
Language: C++

???#include <iostream>
using namespace std;
int main()
{
	int n, i, x;

	cin >> n;
	i = 1 ;
	3 <= n <= 10000;

	while (i <= n - 1)
	{
		i ++ ;
		x = i;

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

Compiler output:
a.cc:1:4: error: stray '#' in program
    1 | ???#include <iostream>
      |    ^
a.cc:1:1: error: expected unqualified-id before '?' token
    1 | ???#include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> n;
      |         ^~~
a.cc:18:25: error: 'cout' was not declared in this scope
   18 |                         cout << " " << i;
      |                         ^~~~
a.cc:22:25: error: 'cout' was not declared in this scope
   22 |                         cout << " " << i;
      |                         ^~~~
a.cc:26:25: error: 'cout' was not declared in this scope
   26 |                         cout << " " << i;
      |                         ^~~~
a.cc:30:25: error: 'cout' was not declared in this scope
   30 |                         cout << " " << i;
      |                         ^~~~
a.cc:34:25: error: 'cout' was not declared in this scope
   34 |                         cout << " " << i;
      |                         ^~~~
a.cc:37:9: error: 'cout' was not declared in this scope
   37 |         cout << endl;
      |         ^~~~
a.cc:37:17: error: 'endl' was not declared in this scope
   37 |         cout << endl;
      |                 ^~~~
Language: C++

???#include <iostream>
using namespace std;
int main()
{
	int n, i, x;

	cin >> n;
	i = 1 ;
	3 <= n <= 10000;

	while (i <= n - 1)
	{
		i ++ ;
		x = i;

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

Compiler output:
a.cc:1:4: error: stray '#' in program
    1 | ???#include <iostream>
      |    ^
a.cc:1:1: error: expected unqualified-id before '?' token
    1 | ???#include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> n;
      |         ^~~
a.cc:18:25: error: 'cout' was not declared in this scope
   18 |                         cout << " " << i;
      |                         ^~~~
a.cc:22:25: error: 'cout' was not declared in this scope
   22 |                         cout << " " << i;
      |                         ^~~~
a.cc:26:25: error: 'cout' was not declared in this scope
   26 |                         cout << " " << i;
      |                         ^~~~
a.cc:30:25: error: 'cout' was not declared in this scope
   30 |                         cout << " " << i;
      |                         ^~~~
a.cc:34:25: error: 'cout' was not declared in this scope
   34 |                         cout << " " << i;
      |                         ^~~~
a.cc:37:9: error: 'cout' was not declared in this scope
   37 |         cout << endl;
      |         ^~~~
a.cc:37:17: error: 'endl' was not declared in this scope
   37 |         cout << endl;
      |                 ^~~~
Language: C++

#include <cstdio>
#include <cmath>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   15 |             if(i / pow(10, j) % 10 == 3){
      |                ~~~~~~~~~~~~~~ ^ ~~
      |                  |              |
      |                  |              int
      |                  __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include <cstdio>
#include <cmath>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   15 |             if(i / pow(10, j) % 10 == 3){
      |                ~~~~~~~~~~~~~~ ^ ~~
      |                  |              |
      |                  |              int
      |                  __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include<iostream>
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) {
            i / = 10;
            cout << " " << i;
        } else {
            continue;
        }
        
    }
    
    cout << endl;

    
    
    // cout << min << " " << max << " " << sum << endl;
    
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected primary-expression before '=' token
   11 |             i / = 10;
      |                 ^
Language: C++

#include<stdio.h>

void call(int n){
int i=1,x=1,a=0;
for(;++i>=n;x=i){
if(x%3==0&&a==0){
printf("%d",i);
}
else if(x%10==3||a==1){
printf("%d",i);
}
a=0;
else{
x/=10;
if(x)a=1;
}
printf("\n");
}
int main(){
int ask;
scanf("%d",&ask);
call(ask);
}

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

#include<stdio.h>

void call(int n){
int i=1,x=1,a=0;
for(;++i>=n;x=i){
if(x%3==0&&a==0){
printf("%d",i);
}
else if(x%10==3||a==1){
printf("%d",i);
}
a=0;
else{
x/=10;
if(x)a=1;
}
printf("\n");
}
}
int main(){
int ask;
scanf("%d",&ask);
call(ask);
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:13:1: error: 'else' without a previous 'if'
   13 | else{
      | ^~~~
Language: C++

#include<stdio.h>

void call(int n){
int i=1,x=1,a=0;
for(;++i>=n;x=i){
if(a==0){
if(x%3==0){
printf("%d",i);
}
}
while(a==1){
a=0;
if(x%10==3){
printf("%d",i);
}
else{
x/=10;
if(x)a=1;
}
}
printf("\n");
}
int main(){
int ask;
scanf("%d",&ask);
call(ask);
}

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

#include<stdio.h>

void call(int n){
int i=0,x,a=0;
for(;++i>=n;x=i){
if(a==0){
a=1;
if(x%3==0){
a=0;
printf("%d",i);
}
}
while(a==1){
a=0;
if(x%10==3){
printf("%d",i);
}
else{
x/=10;
if(x)a=1;
}
}
printf("\n");
}
int main(){
int ask;
scanf("%d",&ask);
call(ask);
}

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

#include<stdio.h>

void call(int n){
int i=0,x=1,a=0;
for(;++i>=n;x=i){
if(a==0){
a=1;
if(x%3==0){
a=0;
printf("%d",i);
}
}
while(a==1){
a=0;
if(x%10==3){
printf("%d",i);
}
else{
x/=10;
if(x)a=1;
}
}
printf("\n");
}
int main(){
int ask;
scanf("%d",&ask);
call(ask);
}

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

#include<stdio.h>

int main(){
int ask;
scanf("%d",&ask);
for(int i=0;i<n;i++){
if(i%3==0)printf("%d",i);
else if(i%10==3)printf("%d",i);
}
printf("\n");
}

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

#include <stdio.h>

int main(){
  int in;
  scanf("%d", &in);
  for(int i = 1; i<= in;i++){
    if(i%3==0){
      printf(" %d", i);
    }else{
      int temp=i;
      while (temp>10) {
        if(temp%10==3){printf(" %d", i); break;}
        temp/=10;
      }
    }
  }
  printf("\n");
???return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:1: error: expected primary-expression before '?' token
   18 | ???return 0;
      | ^
a.cc:18:2: error: expected primary-expression before '?' token
   18 | ???return 0;
      |  ^
a.cc:18:3: error: expected primary-expression before '?' token
   18 | ???return 0;
      |   ^
a.cc:18:4: error: expected primary-expression before 'return'
   18 | ???return 0;
      |    ^~~~~~
a.cc:18:4: error: expected ':' before 'return'
   18 | ???return 0;
      |    ^~~~~~
      |    :
a.cc:18:4: error: expected primary-expression before 'return'
   18 | ???return 0;
      |    ^~~~~~
a.cc:18:4: error: expected ':' before 'return'
   18 | ???return 0;
      |    ^~~~~~
      |    :
a.cc:18:4: error: expected primary-expression before 'return'
   18 | ???return 0;
      |    ^~~~~~
a.cc:18:4: error: expected ':' before 'return'
   18 | ???return 0;
      |    ^~~~~~
      |    :
a.cc:18:4: error: expected primary-expression before 'return'
   18 | ???return 0;
      |    ^~~~~~
Language: C++

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

Compiler output:
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++){
    int x=i;
    if(x%3==0){
    cout << " " << endl;
    }else{
      while(x!=0){
        if(x%3==0){
          cout << " " << endl;
          break;
        }else{
          x=x/10
        }
      }
    }
  }
}

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

#include<iostream>
using namespace std;

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:34: error: expected '}' before 'else'
   13 |                                 }else if(i % 10 == 3){
      |                                  ^~~~
a.cc:10:39: note: to match this '{'
   10 |                         if(i % 3 == 0){
      |                                       ^
a.cc: At global scope:
a.cc:22:9: error: expected unqualified-id before 'return'
   22 |         return 0;
      |         ^~~~~~
a.cc:23:9: error: expected declaration before '}' token
   23 |         }
      |         ^
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:34: error: expected '}' before 'else'
   13 |                                 }else if(i % 10 == 3){
      |                                  ^~~~
a.cc:10:39: note: to match this '{'
   10 |                         if(i % 3 == 0){
      |                                       ^
a.cc: At global scope:
a.cc:22:9: error: expected unqualified-id before 'return'
   22 |         return 0;
      |         ^~~~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:34: error: expected '}' before 'else'
   16 |                                 }else{
      |                                  ^~~~
a.cc:12:54: note: to match this '{'
   12 |                                 }else if(i % 10 == 3){
      |                                                      ^
a.cc: At global scope:
a.cc:22:9: error: expected unqualified-id before 'return'
   22 |         return 0;
      |         ^~~~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:34: error: expected '}' before 'else'
   16 |                                 }else{
      |                                  ^~~~
a.cc:12:54: note: to match this '{'
   12 |                                 }else if(i % 10 == 3){
      |                                                      ^
a.cc: At global scope:
a.cc:21:9: error: 'cout' does not name a type
   21 |         cout << endl;
      |         ^~~~
a.cc:22:9: error: expected unqualified-id before 'return'
   22 |         return 0;
      |         ^~~~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^