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

#include <stdio.h>

int x,y;

main(){
	scanf("%d",&x);
	for(y=1;y<=x;){
	 if(y%3==0){printf(" %d",y);}
	 else if(y%10==3||y/10==3||y/100==3){printf(" %d",y);}
	 else if(y%100/10==3||y%1000%100/10==3){printf(" %d",y);}
	 else if(y%1000=3||y%2000==3){printf(" %d",y);}  
	 if(x==y){printf("\n");}
	 y++;
	}

  return 0;
}  
  

Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:11:19: error: lvalue required as left operand of assignment
   11 |          else if(y%1000=3||y%2000==3){printf(" %d",y);}
      |                  ~^~~~~
Language: C++

#include <iostream>
using namespace std;

void call(int n);

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

return 0;
}

void call(int n){

int i=1;

while(true){
int x=i;

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

else{

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

}

if(++i>n)break;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:36:2: error: expected '}' at end of input
   36 | }
      |  ^
a.cc:19:12: note: to match this '{'
   19 | while(true){
      |            ^
a.cc:36:2: error: expected '}' at end of input
   36 | }
      |  ^
a.cc:15:17: note: to match this '{'
   15 | void call(int n){
      |                 ^
Language: C++

#include <iostream>
using namespace std;

void call(int n);

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

return 0;
}

void call(int n){

int i=1;

while(true){
int x=i;

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

else{

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

if(++i>n)break;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:36:2: error: expected '}' at end of input
   36 | }
      |  ^
a.cc:15:17: note: to match this '{'
   15 | void call(int n){
      |                 ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	
	for( i = 3; i <= n; i++ ){
		if( i % 3 == 0) {
			cout << " " << i;
			break;
		}

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

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

#include<iostream>
using namespace std;

int main(){
	int i, n, x;
	cin >> n;
	
	for( i = 3; i <= n; i++ ){
		x = i;
		
		if( x % 3 == 0 ){
			count << ' ' << i;
			break;
		}
		if( x % 10 == 3 ){
			count << ' ' << i;
			break;
		}
		
		for( x /= 10; x > 0; x /= 10 ){
			if( x % 10 == 3 ){
				count << ' ' << i;
				break;				
			}
		}
	}
	cout << endl;
}

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

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

Compiler output:
a.cc:4:11: warning: missing terminating " character
    4 |   scanf(%d",&n);
      |           ^
a.cc:4:11: error: missing terminating " character
    4 |   scanf(%d",&n);
      |           ^~~~~~
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:9: error: expected primary-expression before '%' token
    4 |   scanf(%d",&n);
      |         ^
a.cc:4:10: error: 'd' was not declared in this scope
    4 |   scanf(%d",&n);
      |          ^
a.cc:5:19: error: expected ';' before ')' token
    5 |   for(i=1;i<=n;i++){
      |                   ^
      |                   ;
a.cc:16:3: error: 'printf' was not declared in this scope
   16 |   printf("\n");
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | main(){
Language: C++

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

Compiler output:
a.cc:5:11: warning: missing terminating " character
    5 |   scanf(%d",&n);
      |           ^
a.cc:5:11: error: missing terminating " character
    5 |   scanf(%d",&n);
      |           ^~~~~~
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:9: error: expected primary-expression before '%' token
    5 |   scanf(%d",&n);
      |         ^
a.cc:5:10: error: 'd' was not declared in this scope
    5 |   scanf(%d",&n);
      |          ^
a.cc:6:19: error: expected ';' before ')' token
    6 |   for(i=1;i<=n;i++){
      |                   ^
      |                   ;
Language: C++

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

Compiler output:
a.cc: In function 'void call(int)':
a.cc:4:22: error: expected primary-expression before '=' token
    4 |   for(int i = 1; i < = n; i++){
      |                      ^
a.cc:7:7: error: 'cout' was not declared in this scope
    7 |       cout << " " << i;
      |       ^~~~
a.cc:11:11: error: 'cout' was not declared in this scope
   11 |           cout << " " << i;
      |           ^~~~
a.cc:19:3: error: 'cout' was not declared in this scope
   19 |   cout << endl;
      |   ^~~~
a.cc:19:11: error: 'endl' was not declared in this scope
   19 |   cout << endl;
      |           ^~~~
Language: C++

#include <iostream>

using namespace std;

void call(int n);

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

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

Compiler output:
a.cc: In function 'void call(int)':
a.cc:10:22: error: expected primary-expression before '=' token
   10 |   for(int i = 1; i < = n; i++){
      |                      ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int num;

  cin >> num;


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

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
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>
#include<algorithm>
#include<cstdio>
using namespace std;

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

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

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		int n=sc.nextInt();

		for(int i=1;i<=n;i++){
			int x=i;
			
			if(x%3==0){
				System.out.print(" "+i);
			}
			else{
				if(x%10==3||x/10==3||x/100==3||x/1000==3){
					System.out.print(" "+i);
				}
			}
		}
		System.out.println();
	}
}

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

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:7:19: error: 'cout' was not declared in this scope
    7 |         if(i%3==0)cout<<" "<<i;
      |                   ^~~~
a.cc:7:19: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:25: error: 'cout' was not declared in this scope
    8 |         else if(i/10==3)cout<<" "<<i;
      |                         ^~~~
a.cc:8:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:25: error: 'cout' was not declared in this scope
    9 |         else if(i%10==3)cout<<" "<<i;
      |                         ^~~~
a.cc:9:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:29: error: 'cout' was not declared in this scope
   10 |         else if(i/100%10==3)cout<<" "<<i;
      |                             ^~~~
a.cc:10:29: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:31: error: 'cout' was not declared in this scope
   11 |         else if(i/1000%100==3)cout<<" "<<i;
      |                               ^~~~
a.cc:11:31: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout<<endl;
      |     ^~~~
a.cc:13:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:11: error: 'endl' was not declared in this scope
   13 |     cout<<endl;
      |           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:7:19: error: 'cout' was not declared in this scope
    7 |         if(i%3==0)cout<<" "<<i;
      |                   ^~~~
a.cc:7:19: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:25: error: 'cout' was not declared in this scope
    8 |         else if(i/10==3)cout<<" "<<i;
      |                         ^~~~
a.cc:8:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:25: error: 'cout' was not declared in this scope
    9 |         else if(i%10==3)cout<<" "<<i;
      |                         ^~~~
a.cc:9:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout<<endl;
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:11: error: 'endl' was not declared in this scope
   11 |     cout<<endl;
      |           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

using namespace std;

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

    }
    cout<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:7:19: error: 'cout' was not declared in this scope
    7 |         if(i%3==0)cout<<" "<<i;
      |                   ^~~~
a.cc:7:19: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:25: error: 'cout' was not declared in this scope
    8 |         else if(i/10==3)cout<<" "<<i;
      |                         ^~~~
a.cc:8:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:25: error: 'cout' was not declared in this scope
    9 |         else if(i%10==3)cout<<" "<<i;
      |                         ^~~~
a.cc:9:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:21: error: 'cout' was not declared in this scope
   10 | else if(i/100%10==3)cout<<" "<<i;
      |                     ^~~~
a.cc:10:21: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:31: error: 'cout' was not declared in this scope
   11 |         else if(i/1000%100==3)cout<<" "<<i;
      |                               ^~~~
a.cc:11:31: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout<<endl;
      |     ^~~~
a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:11: error: 'endl' was not declared in this scope
   14 |     cout<<endl;
      |           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include <iostream>
using namespace std;

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


}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:1: error: expected primary-expression before 'int'
    5 | int n, i;
      | ^~~
a.cc:5:1: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:1: error: 'cin' does not name a type
    6 | cin >> n;
      | ^~~
a.cc:7:1: error: expected unqualified-id before 'for'
    7 | for (i = 1; i < n + 1; i++) {
      | ^~~
a.cc:7:13: error: 'i' does not name a type
    7 | for (i = 1; i < n + 1; i++) {
      |             ^
a.cc:7:24: error: 'i' does not name a type
    7 | for (i = 1; i < n + 1; i++) {
      |                        ^
a.cc:11:1: error: 'cout' does not name a type
   11 | cout << endl;
      | ^~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:1: error: expected primary-expression before 'int'
    5 | int n;
      | ^~~
a.cc:5:1: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:1: error: 'cin' does not name a type
    6 | cin >> n;
      | ^~~
a.cc:7:1: error: expected unqualified-id before 'for'
    7 | for (int i = 1; i < n + 1; i++) {
      | ^~~
a.cc:7:17: error: 'i' does not name a type
    7 | for (int i = 1; i < n + 1; i++) {
      |                 ^
a.cc:7:28: error: 'i' does not name a type
    7 | for (int i = 1; i < n + 1; i++) {
      |                            ^
a.cc:11:1: error: 'cout' does not name a type
   11 | cout << endl;
      | ^~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main {
      |     ^~~~
a.cc:5:6: error: expected primary-expression before 'int'
    5 |      int n, i;
      |      ^~~
a.cc:5:6: error: expected '}' before 'int'
a.cc:4:10: note: to match this '{'
    4 | int main {
      |          ^
a.cc:6:6: error: 'cin' does not name a type
    6 |      cin >> n;
      |      ^~~
a.cc:7:6: error: expected unqualified-id before 'for'
    7 |      for (i = 1; i < n + 1; i++) {
      |      ^~~
a.cc:7:18: error: 'i' does not name a type
    7 |      for (i = 1; i < n + 1; i++) {
      |                  ^
a.cc:7:29: error: 'i' does not name a type
    7 |      for (i = 1; i < n + 1; i++) {
      |                             ^
a.cc:11:6: error: 'cout' does not name a type
   11 |      cout << endl;
      |      ^~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main {
      |     ^~~~
a.cc:5:6: error: expected primary-expression before 'int'
    5 |      int n, i;
      |      ^~~
a.cc:5:6: error: expected '}' before 'int'
a.cc:4:10: note: to match this '{'
    4 | int main {
      |          ^
a.cc:6:6: error: 'cin' does not name a type
    6 |      cin >> n;
      |      ^~~
a.cc:7:6: error: expected unqualified-id before 'for'
    7 |      for (i = 1; i < n + 1; i++) {
      |      ^~~
a.cc:7:18: error: 'i' does not name a type
    7 |      for (i = 1; i < n + 1; i++) {
      |                  ^
a.cc:7:29: error: 'i' does not name a type
    7 |      for (i = 1; i < n + 1; i++) {
      |                             ^
a.cc:11:6: error: 'cout' does not name a type
   11 |      cout << endl;
      |      ^~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected ';' before 'if'
    8 |           x = i / 10
      |                     ^
      |                     ;
    9 |           if (i % 3 == 0) cout << " " << i;
      |           ~~         
a.cc:10:11: error: 'else' without a previous 'if'
   10 |           else if (i % 10 == 3) cout << " " << i;
      |           ^~~~
Language: C++

#include <iostream>
using namespace std;

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

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

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:38: error: expected ';' before 'i'
   14 |               if (x == 3) cout << " " i;
      |                                      ^~
      |                                      ;
Language: C++

#include<iostream>
using namespace;

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

}
cout<<endl;
}

Compiler output:
a.cc:2:16: error: expected identifier before ';' token
    2 | using namespace;
      |                ^
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 | cin>>n;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:6: error: 'x' was not declared in this scope
    8 | if ( x % 3 == 0 ){
      |      ^
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     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:11:7: error: 'x' was not declared in this scope
   11 | while(x/10){
      |       ^
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:18:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 | 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:18:7: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 | 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;
cin>>n;
for(int i=1;i<=n;i++){
if ( x % 3 == 0 ){
    cout << " " << i;
}
while(x/10){
if( x % 10 == 3 ){
    cout << " " << i;
}
}
 
}
cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: 'x' was not declared in this scope
    8 | if ( x % 3 == 0 ){
      |      ^
a.cc:11:7: error: 'x' was not declared in this scope
   11 | while(x/10){
      |       ^
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;
}
while(i/10){
if( i % 10 == 3 ){
    cout << " " << i;
}
}
 
}
cout<<endl;
}

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

# get line input split by space
def getLnInput():
    return input().split()


# ceil(a / b) for a > b
def ceilDivision(a, b):
    return (a - 1) // b + 1


def call(n):
    i = 1
    while i < n:
        i += 1
        x = i
        if not x % 3:
            print(" " + str(i), end="")
        else:
            while True:
                if x % 10 == 3:
                    print(" " + str(i), end="")
                x //= 10
                if not x:
                    break
    print()


def main():
    n = int(getLnInput()[0])
    call(n)
    return


main()

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #get
    1 | # get line input split by space
      |   ^~~
a.cc:6:3: error: invalid preprocessing directive #ceil
    6 | # ceil(a / b) for a > b
      |   ^~~~
a.cc:2:1: error: 'def' does not name a type
    2 | def getLnInput():
      | ^~~
Language: C++

#include<iostream>
using namespace std;

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

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

#include <iostream>

int main() {

    int i = 1;
    int n;
    std::cin >> n;

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

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

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

  cout << endl;
}

void main(){
 cin >> i;
 call(i);
}

Compiler output:
a.cc:24:1: error: '::main' must return 'int'
   24 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:25:9: error: 'i' was not declared in this scope
   25 |  cin >> i;
      |         ^
Language: C++

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

  cout << endl;
}

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

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

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

int main(){
  int n;

  scanf(" %d",&n);

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

  cout << endl;

  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'x' was not declared in this scope
   15 |       while(x){
      |             ^
Language: C++

#include <cstdio>
using namespace std;

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

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

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

#include <iostream>
using namespace std;

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

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

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

Compiler output:
a.cc:4:5: warning: 'int main(int)' takes only zero or two arguments [-Wmain]
    4 | int main(int n) {
      |     ^~~~
a.cc: In function 'int main(int)':
a.cc:15:40: error: expected ';' before '}' token
   15 |                         } while (x/=10)
      |                                        ^
      |                                        ;
   16 |                 }
      |                 ~
Language: C++

a = gets.chomp.to_i
ans = ""
for i in 1..a do
  if i %3 == 0 or i.to_s =~ /3/ then
    ans <<"#{i}"
  end
end
puts ans

Compiler output:
a.cc:3:10: error: too many decimal points in number
    3 | for i in 1..a do
      |          ^~~~
a.cc:1:1: error: 'a' does not name a type
    1 | a = gets.chomp.to_i
      | ^
Language: C++

#include<iostream>
using namespace std;
int main() {
	int data,j;
	char data_m[10];
	cin >> data;
	for (int i = 1; i <= data; i++) {
		sprintf_s(data_m,"%d",i);
		if (i % 3 == 0) {
			cout << " " << i;
		}
		else {
			for (j = 0; data_m[j] != '\0'; j++) {
				if (data_m[j] == '3')
					cout << " " << i;
			}
		}
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
    8 |                 sprintf_s(data_m,"%d",i);
      |                 ^~~~~~~~~
      |                 sprintf
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
int main() {
	int data,j;
	char data_m[10];
	cin >> data;
	for (int i = 1; i <= data; i++) {
		sprintf_s(data_m,"%d",i);
		if (i % 3 == 0) {
			cout << " " << i;
		}
		else {
			for (j = 0; data_m[j] != '\0'; j++) {
				if (data_m[j] == '3')
					cout << " " << i;
			}
		}
	}
	cout << endl;
	return 0;
}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
	public static void main(String[] args) throws IOException{
		int num;
		String[] str;

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder builder = new StringBuilder();

		str = br.readLine().split(" ");
		num = Integer.parseInt(str[0]);

		for(int i = 1; i <= num; i++){
			if(i % 3 == 0){
				builder.append(" " + i);
			}else if(i % 10 == 3){
				builder.append(" " + i);
			}

			int j = i;
			while(j % 10 > 10){
				if(i / 10 == 3){
					builder.append(" " + i);
				}
			}
		}
		System.out.println(builder);
		br.close();
	}
}

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

#include<iostream>
using namespace std;

void call(int n);

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

  call(c);


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

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: a function-definition is not allowed here before '{' token
   13 | void call(int n){
      |                 ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <algorithm>

using namespace std;

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

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

            while(1){
                if( x % 10 == 3){
                    cout << " " << a;
                    break;
                }
                x /= 10;
                if(!x){
                    break;
                }
            }
        }
    }
    cout << endl;
    return 0;
}

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

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:7:23: note: to match this '{'
    7 |  for(int i=1;i<=n;++i){
      |                       ^
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:7:23: note: to match this '{'
    7 |  for(int i=1;i<=n;++i){
      |                       ^
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<iostream>
using namespace std;

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

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

import java.util.*;

public class Main  {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
Scanner kb=new Scanner(System.in);
int num=kb.nextInt();
for(int i=1;i<=num;i++){
	int x=i;
	if(x%3==0||x%10==3){
		System.out.print(" "+x);
		continue;
	}	
}
System.out.println();
	}

}

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:3:1: error: expected unqualified-id before 'public'
    3 | public class Main  {
      | ^~~~~~
Language: C++

import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
Scanner kb=new Scanner(System.in);
int num=kb.nextInt();
for(int i=1;i<=num;i++){
	if(i%3==0||i%10==3){
		System.out.print(" "+i);
		continue;
	}	
}
System.out.println();
	}

}

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:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected initializer before ':' token
    7 |         int answer:
      |                   ^
a.cc:12:13: error: 'answer' was not declared in this scope
   12 |             answer = i;
      |             ^~~~~~
a.cc:14:24: error: 'answer' was not declared in this scope
   14 |         printf(" %d", &answer);
      |                        ^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected initializer before ':' token
    7 |         int answer:
      |                   ^
a.cc:12:13: error: 'answer' was not declared in this scope
   12 |             answer = i;
      |             ^~~~~~
a.cc:14:23: error: 'answer' was not declared in this scope
   14 |         printf(" %d", answer);
      |                       ^~~~~~
Language: C++

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

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

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

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

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

Compiler output:
a.cc:2:1: error: expected unqualified-id before '?' token
    2 | ??
      | ^
Language: C++

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		int n = Integer.parseInt(line);
		
		System.out.print(" ");
		for (int i = 1; i <= n; i++) {
			if (i % 3 ==0 || String.valueOf(i).contains("3")) {
				System.out.print(i);
				System.out.print(" ");
			}
		}
	}

}

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

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

  std::cout << endl;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:6:10: 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:10: error: 'cout' is not a member of 'std'
   11 |     std::cout << " " << i;
      |          ^~~~
a.cc:11:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:8: error: 'cout' is not a member of 'std'
   19 |   std::cout << endl;
      |        ^~~~
a.cc:19:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:16: error: 'endl' was not declared in this scope
   19 |   std::cout << endl;
      |                ^~~~
Language: C++

#include <iostream>
using namespace std;
void call(int n){
    for(int i=1;i<=n;i++){
        if(i%3==0||i%10==3||(i/10)%3=0||(i/100)%3=0||(i/1000)%3=0){
            cout<<" "<<i;
        }
    }
    cout<<endl;
}
int main(){
    int v;
    cin>>v;
    call(v);
    return 0;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:5:52: error: lvalue required as left operand of assignment
    5 |         if(i%3==0||i%10==3||(i/10)%3=0||(i/100)%3=0||(i/1000)%3=0){
      |                                                   ~^~~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
void call(int n){
    for(int i=1;i<=n;i++){
        if(i%3==0){
            cout<<" "<<i;
        }else{
            string s0=to_string(i);
            const char* s1=s0.data();
            const char* s2="3";
            if(strstr(s1,s2)!=NULL){
                cout<<" "<<i;
            }
        }
    }
    cout<<endl;
}
int main(){
    int v;
    cin>>v;
    call(v);
    return 0;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:12:16: error: 'strstr' was not declared in this scope
   12 |             if(strstr(s1,s2)!=NULL){
      |                ^~~~~~
a.cc:2:1: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

#include <iostream>
#include <string>
#include <sstream>
using namespace std;
void call(int n){
    for(int i=1;i<=n;i++){
        if(i%3==0){
            cout<<" "<<i;
        }else{
            string s0=to_string(i);
            const char* s1=s0.data();
            const char* s2="3";
            if(strstr(s1,s2)!=NULL){
                cout<<" "<<i;
            }
        }
    }
    cout<<endl;
}
int main(){
    int v;
    cin>>v;
    call(v);
    return 0;
}

Compiler output:
a.cc: In function 'void call(int)':
a.cc:13:16: error: 'strstr' was not declared in this scope
   13 |             if(strstr(s1,s2)!=NULL){
      |                ^~~~~~
a.cc:4:1: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <sstream>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

import java.util.Scanner;

public class Main {
 public static void main(String[] args) {
  Scanner sc = new Scanner(System.in);
  while (true) {
   int i = sc.nextInt();
   int x = i;
   if (x%3 == 0 || x%10 == 3) {
    System.out.printf(i);
   }
   System.out.ptintf("\n")
  }
 }
}

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


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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin>>x;
      |         ^~~
a.cc:7:9: error: 'cout' was not declared in this scope
    7 |         cout<<i;
      |         ^~~~
a.cc:20:15: error: 'endl' was not declared in this scope
   20 |         cout<<endl;
      |               ^~~~
Language: C++

#include <iostream>
using namespace std;

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

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

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

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

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

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++

a = int(input())
x=-1
y=[]
while x<=a:
    x+=1
    if x%10==3 or x%3==0:
        y.append(str(x))
       
print(" ".join(y))

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a = int(input())
      | ^