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

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

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

import java.util.Scanner;
public class Main {
 private static Scanner sc;
 public static void main(String[] args){
  int i;
  sc = new Scanner(System.in);
  int n = sc.nextInt();
  System.out.println();
   for(i=3;i<=n;i++){
	   if(n<3||n>10000){
		   break;
	   }
    if(i%3==0 || i%10-3==0){
     System.out.print(" "+i);
    } 
    else{
     if(i%10==3){
      System.out.print(" "+i);
     }
    }
   }
 }
}

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

#include <iostream>
using namespace std;

int call(int n) {
	int i ;
	cin >> n;

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

}

Compiler output:
a.cc: In function 'int call(int)':
a.cc:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | }
      | ^
/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;
   for(i=1;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 'void call(int)':
a.cc:4:25: error: 'printf' was not declared in this scope
    4 |       if( i %  3 == 0 ){printf(" %d",i);}
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | void call(int n){
a.cc:5:30: error: 'printf' was not declared in this scope
    5 |       else if( i % 10 == 3 ){printf(" %d",i);}
      |                              ^~~~~~
a.cc:5:30: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:7:4: error: 'printf' was not declared in this scope
    7 |    printf("\n");
      |    ^~~~~~
a.cc:7:4: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<stdio.h>
int main( ){ 
int n;
scanf(" %d",&n);
for(int i=1;i<=n;i++){
if(i%3==0)printf(" %d",i);
else if(I%10==3)printf(" %d",i);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'I' was not declared in this scope
    7 | else if(I%10==3)printf(" %d",i);
      |         ^
Language: C++

#include<stdio.h>
int main( ){ 
int n;
scanf(" %d",&n);
for(int i=1;i<=n;i++){
if(i%3==0)cout << " " << i;
else if(i%10==3)out << " " << i;
}
cout << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'cout' was not declared in this scope
    6 | if(i%3==0)cout << " " << i;
      |           ^~~~
a.cc:7:17: error: 'out' was not declared in this scope
    7 | else if(i%10==3)out << " " << i;
      |                 ^~~
a.cc:9:1: error: 'cout' was not declared in this scope
    9 | cout << endl;
      | ^~~~
a.cc:9:9: error: 'endl' was not declared in this scope
    9 | cout << endl;
      |         ^~~~
Language: C++

#include<stdio.h>
int main( ){ 
int n;
scanf(" %d",&n);
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:6:11: error: 'cout' was not declared in this scope
    6 | if(i%3==0)cout << " " << i;
      |           ^~~~
a.cc:7:17: error: 'cout' was not declared in this scope
    7 | else if(i%10==3)cout << " " << i;
      |                 ^~~~
a.cc:9:1: error: 'cout' was not declared in this scope
    9 | cout << endl;
      | ^~~~
a.cc:9:9: error: 'endl' was not declared in this scope
    9 | cout << endl;
      |         ^~~~
Language: C++

#include<stdio.h>
int main( ){
  int n,i;
  scanf("%d",&n);
  for( i=1;i<=n;i++){
    if(i%3==0)printf(" %d",i);
    else if(i%10==3)printf(" %d",i);
  }
  cout << endl;
  return 0;
}

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

int main(void)
{
    int x,i;
    scanf("%d",&x);
    for(i=1;i<=x;i++)
    {
        if(i%3==0)
        {
            printf(" %d",i);
        }
        else if(i%10==3)
        {
            printf(" %d",i);
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'scanf' was not declared in this scope
    4 |     scanf("%d",&x);
      |     ^~~~~
a.cc:9:13: error: 'printf' was not declared in this scope
    9 |             printf(" %d",i);
      |             ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void)
a.cc:13:13: error: 'printf' was not declared in this scope
   13 |             printf(" %d",i);
      |             ^~~~~~
a.cc:13:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <stdio.h>

void include3(x, i) {
  if(x % 10 == 3) {
    printf(" %d", i);
    return;
  }
  x /= 10;
  if(x) return include3(x, i);
  return;
}

int main() {
  int n;
  int i;
  int x;
  scanf("%d", &n);
  for(i = 0; i < n; i++) {
    x = i;
    if(x % 3 == 0) {
      printf(" %d\n", i);
      continue;
    }
    include3(x, i);
  }
  return 0;
}

Compiler output:
a.cc:3:6: error: variable or field 'include3' declared void
    3 | void include3(x, i) {
      |      ^~~~~~~~
a.cc:3:15: error: 'x' was not declared in this scope
    3 | void include3(x, i) {
      |               ^
a.cc:3:18: error: 'i' was not declared in this scope
    3 | void include3(x, i) {
      |                  ^
a.cc: In function 'int main()':
a.cc:24:5: error: 'include3' was not declared in this scope
   24 |     include3(x, i);
      |     ^~~~~~~~
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: lvalue required as left operand of assignment
   19 |   while(n >= 3  && n = 10000) {
      |         ~~~~~~~~^~~~
Language: C++

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

  cout << endl;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |     cout << " " << i;
      |     ^~~~
      |     std::cout
In file included 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:12:5: 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:20:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |   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:20:11: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 |   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 <string>
#include <math.h>
using namespace std;

int main(void)
{
  int n,x;
  string s;
  cin >> n;

  for(int i=1; i<=n; i++){
    x = i;
    s = std::to_string(x);
    if(x % 3 == 0 || x % 10 ==3){
      cout << " " << i; continue;
    }
    else{
      int k=s.size();
      while(k>0){
        k=k-1;
	int j = pow(10,k);
        if( (x / j) % 10 == 3){
          cout << " " << i;
          break;
        }
      }
    }
  }
  cout << endl;

  call(n);

  return 0;
}

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

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

void call(int n)
{
	int i = 1;
	int x;
	int flag = 0;

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

		if (flag) {
			flag = 0; 
			continue;
		}
		if (++i > n) break;
	}
	cout << endl;
}

int _tmain(int argc, _TCHAR* argv[])
{

	call(30);
	return 0;
}

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



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

 
Compile Error Logs: 

You are not authorized to see the message. 
 
 
??????????????? 
Judge: 8/8  C++  CPU: 00.00 sec  Memory: 1160 KB  Length: 388 B  2016-07-02 00:12  2016-07-02 00:12  
???????????±????????????????????? 
Case # Verdict CPU Time Memory In Out Case Name 
 Case #1: : Accepted  00.00 sec 1160 KB    
 Case #2: : Accepted  00.00 sec 1160 KB    
 Case #3: : Accepted  00.00 sec 1160 KB    
 Case #4: : Accepted  00.00 sec 1160 KB    
 Case #5: : Accepted  00.00 sec 1160 KB    
 Case #6: : Accepted  00.00 sec 1160 KB    
 Case #7:  

Compiler output:
a.cc:33:12: error: extended character ± is not valid in an identifier
   33 | ???????????±?????????????????????
      |            ^
a.cc:34:6: error: stray '#' in program
   34 | Case # Verdict CPU Time Memory In Out Case Name
      |      ^
a.cc:35:7: error: stray '#' in program
   35 |  Case #1: : Accepted  00.00 sec 1160 KB
      |       ^
a.cc:36:7: error: stray '#' in program
   36 |  Case #2: : Accepted  00.00 sec 1160 KB
      |       ^
a.cc:37:7: error: stray '#' in program
   37 |  Case #3: : Accepted  00.00 sec 1160 KB
      |       ^
a.cc:38:7: error: stray '#' in program
   38 |  Case #4: : Accepted  00.00 sec 1160 KB
      |       ^
a.cc:39:7: error: stray '#' in program
   39 |  Case #5: : Accepted  00.00 sec 1160 KB
      |       ^
a.cc:40:7: error: stray '#' in program
   40 |  Case #6: : Accepted  00.00 sec 1160 KB
      |       ^
a.cc:41:7: error: stray '#' in program
   41 |  Case #7:
      |       ^
a.cc:26:1: error: 'Compile' does not name a type
   26 | Compile Error Logs:
      | ^~~~~~~
Language: C++

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

using namespace std;
int main()
{
	int i, j, m, n, cnt = 0, cnt1 = 0;
	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 'int main()':
a.cc:10:26: error: a function-definition is not allowed here before '{' token
   10 |         void call(int n) {
      |                          ^
Language: C++

#include <stdio.h>

int main(void)
{
	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 'int main()':
a.cc:5:25: error: a function-definition is not allowed here before '{' token
    5 |         void call(int n){
      |                         ^
Language: C++

#include <stdio.h>

int main(void)
{
	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 'int main()':
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;
      |           ^~~~
a.cc: At global scope:
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

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

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

#include <iostream>
using namespace std;

int main(){
	int a , b;

	bool has3(int x){
		while(x){
			if (x % 10 == 3 ) return true;
			x /= 10;
		}
		return false;
	}
		
void call(int n){
	for ( int x =1 ; x <= n; x++ ){
		if ( x% 3 == 0 || has3(x) ){
			cout << " " << x;
		}
	}
	cout << endl;
}

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

	return 0
}

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

#include <iostream>
using namespace std;

int main(){
	int a , b;

	bool has3(int x){
		while(x){
			if (x % 10 == 3 ) return true;
			x /= 10;
		}
		return false;
	}
		
void call(int n){
	for ( int x =1 ; x <= n; x++ ){
		if ( x% 3 == 0 || has3(x) ){
			cout << " " << x;
		}
	}
	cout << endl;
}

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

	return 0 ;
}

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

#include<cstdio>

int main(void){
int i,n,x;
scanf("%d",&n);
for(i=1;i<=n;i++){
if(i%3==0){printf(" %d",i);
}else {
x=i;
do {
if(x%10==3){printf(" %d",i);}
x=x/10;

} while(x!=0);
;}printf(\n);
}
return 0;
}

Compiler output:
a.cc:15:10: error: stray '\' in program
   15 | ;}printf(\n);
      |          ^
a.cc: In function 'int main()':
a.cc:15:11: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   15 | ;}printf(\n);
      |           ^
      |           |
      |           int
In file included from /usr/include/c++/14/cstdio:42,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

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

int main(){

int n; cin >> n;

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

	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'x' was not declared in this scope
    9 |         x=i;
      |         ^
a.cc:19:18: error: expected primary-expression before '/' token
   19 |                 }/
      |                  ^
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

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

  cout << endl;
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(void){
      | ^~~~
Language: C++

#include <iostream>
using namespace std;

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

  cout << endl;
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(int n){
      | ^~~~
a.cc:4:6: warning: 'int main(int)' takes only zero or two arguments [-Wmain]
    4 | void main(int n){
      |      ^~~~
Language: C++

#include <iostream>
using namespace std;

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

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

	cout << endl;
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(void){
      | ^~~~
Language: C++

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

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

	cout << endl;
}

Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | void main(void){
      | ^~~~
Language: C++

#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<string.h>
using namespace std;
int main() {
	int n;
	int call;
	void call {
		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:9:14: error: variable or field 'call' declared void
    9 |         void call {
      |              ^~~~
a.cc:10:17: error: expected primary-expression before 'int'
   10 |                 int i = 1;
      |                 ^~~
a.cc:10:17: error: expected '}' before 'int'
a.cc:9:19: note: to match this '{'
    9 |         void call {
      |                   ^
a.cc:12:25: error: 'i' was not declared in this scope
   12 |                 int x = i;
      |                         ^
a.cc: At global scope:
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
Language: C++

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

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

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

    return 0;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:7:9: error: expected ',' or ';' before 'if'
    7 |         if(x % 3 == 0) {
      |         ^~
a.cc:13:13: error: 'contiune' was not declared in this scope
   13 |             contiune;
      |             ^~~~~~~~
Language: C++

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

    }

  }
  cout << endl;
}

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

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

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

#include <iostream>
using namespace std;

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

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 has3(int)':
a.cc:6:42: error: return-statement with a value, in function returning 'void' [-fpermissive]
    6 |                 if ( x % 10 == 3) return true;
      |                                          ^~~~
a.cc: In function 'void call(int)':
a.cc:13:39: error: could not convert 'has3(x)' from 'void' to 'bool'
   13 |                 if (x % 3 == 0 || has3(x) ){
      |                                   ~~~~^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected primary-expression before '<=' token
    7 |  for (int i=1; <=n; ++i)
      |                ^~
a.cc:9:6: error: 'x' was not declared in this scope
    9 |   if(x%3 == 0) cout << " " << i;
      |      ^
a.cc:10:6: error: 'x' was not declared in this scope
   10 |   if(x%10 == 3) cout << " " << i;
      |      ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected primary-expression before '<=' token
    7 |  for (int i=1; <=n; ++i)
      |                ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'x' was not declared in this scope
    9 |   if ( x % 3 == 0 ) cout << " " << i;
      |        ^
a.cc:10:8: error: 'x' was not declared in this scope
   10 |   if ( x % 10 == 3) cout << " " << i;
      |        ^
Language: C++

#include <iostream>
using namespace std;
int main(){
        int n;
        cin>>n;
        for(int k=1;k<=n;k++)
        if(k%3==0||k%10==3||k/10==3||130<=k$$k<140){
                cout<<" ";
                cout<<k;
        }
        cout<<endl;
        
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:43: error: 'k$$k' was not declared in this scope
    7 |         if(k%3==0||k%10==3||k/10==3||130<=k$$k<140){
      |                                           ^~~~
Language: C++

void call(int n)
{
	int i = 1;
	bool b = true;

	while (b)
	{
		b = false;

		int x = i;

		if (x % 3 == 0)
		{
			cout << " " << i;
			
			if (++i <= n)
			{
				b = true;
				continue;
			}
		}

		if (x % 10 == 3)
		{
			cout << " " << i;
			if (++i <= n)
			{
				b = true;
				continue;
			}
		}

		x /= 10;
		if (x)
		{
			if (x % 10 == 3)
			{
				cout << " " << i;
				if (++i <= n)
				{
					b = true;
					continue;
				}
			}
		}
	}
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: expected primary-expression before '}' token
   13 |   }
      |   ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: expected primary-expression before '}' token
   13 |   }
      |   ^
Language: C++

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected '(' before 'else'
    9 |                 if else(i%10 == 0)cout << " " << i;
      |                    ^~~~
      |                    (
Language: C++

#include<stdio.h>
int main() {
	int n;
	scanf("%d", &n);
	for (int i = 1; i <= n; i++)
		if (i % 3 == 0 || i % 10 == 3)
			printf("%d ", i);
	puts("");

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

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

Compiler output:
a.cc: In function 'void call(int)':
a.cc:6:18: 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:10:26: error: 'cout' is not a member of 'std'
   10 |                     std::cout << " " << i;
      |                          ^~~~
a.cc:10:26: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:10: error: 'cout' is not a member of 'std'
   18 |     std::cout << std::endl;
      |          ^~~~
a.cc:18:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:23: error: 'endl' is not a member of 'std'
   18 |     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 <math.h>

int main()
{
    int n, i, j, digits, check;
    scanf("%d", &n);
    for (i = 3;i <= n;i++){
        if (i % 3 == 0 || i % 10 == 3){
            printf(" %d", i);
        }
        digits = floorf(log10(i)+1);
        for (j = 1; j <= digits; j++){
           check = i / pow(10,j) % 10;
           if (check == 3){
               printf(" %d", i);
           }
        }   
    }
    return 0;
}

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

#include <iostream>

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

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

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

int main()
{
  int num ;
  std::cin >> num ;

  call( num ) ;

  return 0 ;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:22:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   22 |   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++

#include <iostream>

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

  for ( ; i <= n ; ++i ) {
    int x = i ;
    
    bool bMatch = ( x % 3 == 0 ) ;
    for ( ; x && !bMatch ; x /= 10 ) {
      bMatch = ( x % 10 == 3 ) ;
    }
    if ( bMatch )
      std::cout << " " << i ;
  }
  std::cout << endl ;
}

int main()
{
  int num ;
  std::cin >> num ;

  call( num ) ;

  return 0 ;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:17:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |   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++

#include <iostream>

using namespace st;

int main(void){

  int n;

  cin >> n;

  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:3:17: error: 'st' is not a namespace-name
    3 | using namespace st;
      |                 ^~
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   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:13:8: 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:15:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |        cout << " " << i;
      |        ^~~~
      |        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:3: 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:18: 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>
using namespace std;

int main()
{
	int n=0;
	cin >> n;
	int y = 0;
	for (int i = 1; i <= n; i++)
	{
		int x = i;
		if (x % 3 == 0)//i???3????????°?????¨???i?????????
		{
			cout << ' ' << x + y * 30;
			continue;
		}
		while (x) {
			if (x % 10 == 3)
			{
				cout << " " << i;
				break;
			}
			x /= 10;
		}
	}
	return 0;

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

#include <iostream>
using namespace std;
 
int main()
{
    int n=0;
    cin >> n;
    int y = 0;
    for (int i = 1; i <= n; i++)
    {
        int x = i;
        if (x % 3 == 0)//i???3?????????°??????¨???i?????????
        {
            cout << ' ' <<i
            continue;
        }
        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:14:28: error: expected ';' before 'continue'
   14 |             cout << ' ' <<i
      |                            ^
      |                            ;
   15 |             continue;
      |             ~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

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

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected primary-expression before '<' token
    7 |  for(int i=0;i=<x;i++){
      |                ^
Language: C++

#include <iostream>
using namespace std;

int main(){
 int x;
 cin >> x;
 for(int i=0;i=<x;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:16: error: expected primary-expression before '<' token
    7 |  for(int i=0;i=<x;i++){
      |                ^
Language: C++

#include <iostream>
using namespace std;

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

 return 0;
}

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

#include <stdio.h>
#include <iostream>
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;
}
int main(){
int n;

scanf("%d",&n);
call(n);
}

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 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: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/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>
using namespace std;
int main(){
cin>>a;
for(int i=1;i<=a;i++){
int j=i;
while(true){
d=j%10;
if(d%3==0){
cout<<i<<' ';
break;
}
j/=10;
if(j==0)
break;

}





}




return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:6: error: 'a' was not declared in this scope
    4 | cin>>a;
      |      ^
a.cc:8:1: error: 'd' was not declared in this scope
    8 | d=j%10;
      | ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int a;
cin>>a;
for(int i=1;i<=a;i++){
  int j=i;  
    if(i%3==0){
      cout<<' '<<i;
    }
    else{
  while(true){
  if(j%10==3){
    cout<<' '<<i;
    break;
  }
    j/=10;
    if(j==0)
    break;
  }
  
}


}
}


}
}

Compiler output:
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

def is_puts?(num)
  return true if num % 3 == 0
  while num > 0
    num /= 10
    return true if num == 3
  end
  return false
end

n = gets.chomp.to_i
str = ''
(1..n).each do |i|
  if is_puts?(i)
    str << " #{i}"
  end
end
puts str

Compiler output:
a.cc:11:7: error: empty character constant
   11 | str = ''
      |       ^~
a.cc:12:2: error: too many decimal points in number
   12 | (1..n).each do |i|
      |  ^~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def is_puts?(num)
      | ^~~
Language: C++

def is_puts?(num)
  return true if num % 3 == 0 || num % 10 == 3
  while num > 0
    num /= 10
    return true if num % 10 == 3
  end
  return false
end
  
n = gets.chomp.to_i
str = ''
(1..n).each do |i|
  if is_puts?(i)
    str << " #{i}"
  end
end
puts str

Compiler output:
a.cc:11:7: error: empty character constant
   11 | str = ''
      |       ^~
a.cc:12:2: error: too many decimal points in number
   12 | (1..n).each do |i|
      |  ^~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def is_puts?(num)
      | ^~~
Language: C++

#inculde<iostream>
using namespace std;
int main()
{
	int n;
	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;
				}
				x /= 10
			}
		}
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inculde; did you mean #include?
    1 | #inculde<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         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 | #inculde<iostream>
a.cc:7:14: error: 'i' was not declared in this scope
    7 |         for (i=1;i<n+1;i++)
      |              ^
a.cc:10:25: error: 'cout' was not declared in this scope
   10 |                         cout << " " << i;
      |                         ^~~~
a.cc:10:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:25: error: 'x' was not declared in this scope
   12 |                         x = i;
      |                         ^
a.cc:15:41: error: 'cout' was not declared in this scope
   15 |                                         cout << " " << i;
      |                                         ^~~~
a.cc:15: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 | #inculde<iostream>
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int n;
	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;
				}
				x /= 10
			}
		}
	}
	cout << endl;
	return 0;
}

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

#include<iostream>
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;
				}
				x /= 10
			}
		}
	}
	cout << endl;
	return 0;
}

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