Language: Java

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

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
??
^
Main.java:4: error: illegal start of type
??public static void main(String[] args) {
^
Main.java:5: error: illegal start of expression
????Scanner sc = new Scanner(System.in);
^
Main.java:5: error: illegal start of expression
????Scanner sc = new Scanner(System.in);
 ^
Main.java:5: error: illegal start of expression
????Scanner sc = new Scanner(System.in);
  ^
Main.java:5: error: illegal start of expression
????Scanner sc = new Scanner(System.in);
   ^
Main.java:5: error: : expected
????Scanner sc = new Scanner(System.in);
           ^
Main.java:5: error: : expected
????Scanner sc = new Scanner(System.in);
                                       ^
Main.java:6: error: illegal start of expression
????int n = sc.nextInt();
^
Main.java:6: error: illegal start of expression
????int n = sc.nextInt();
 ^
Main.java:6: error: illegal start of expression
????int n = sc.nextInt();
  ^
Main.java:6: error: illegal start of expression
????int n = sc.nextInt();
   ^
Main.java:6: error: '.class' expected
????int n = sc.nextInt();
        ^
Main.java:6: error: : expected
????int n = sc.nextInt();
                        ^
Main.java:7: error: illegal start of expression
????int a;
^
Main.java:7: error: illegal start of expression
????int a;
 ^
Main.java:7: error: illegal start of expression
????int a;
  ^
Main.java:7: error: illegal start of expression
????int a;
   ^
Main.java:7: error: '.class' expected
????int a;
        ^
Main.java:7: error: : expected
????int a;
         ^
Main.java:8: error: illegal start of expression
????for (int i = 1; i <= n; i++) {
^
Main.java:8: error: illegal start of expression
????for (int i = 1; i <= n; i++) {
 ^
Main.java:8: error: illegal start of expression
????for (int i = 1; i <= n; i++) {
  ^
Main.java:8: error: illegal start of expression
????for (int i = 1; i <= n; i++) {
   ^
Main.java:8: error: illegal start of expression
????for (int i = 1; i <= n; i++) {
    ^
Main.java:9: error: illegal start of expression
??????if (i % 3 == 0 || i % 10 == 3) {
^
Main.java:9: error: illegal start of expression
??????if (i % 3 == 0 || i % 10 == 3) {
 ^
Main.java:9: error: illegal start of expression
??????if (i % 3 == 0 || i % 10 == 3) {
  ^
Main.java:9: error: illegal start of expression
??????if (i % 3 == 0 || i % 10 == 3) {
   ^
Main.java:9: error: illegal start of expression
??????if (i % 3 == 0 || i % 10 == 3) {
    ^
Main.java:9: error: illegal start of expression
??????if (i % 3 == 0 || i % 10 == 3) {
     ^
Main.java:9: error: illegal start of expression
??????if (i % 3 == 0 || i % 10 == 3) {
      ^
Main.java:10: error: illegal start of expression
????????System.out.print(" " + i);
^
Main.java:10: error: illegal start of expression
????????System.out.print(" " + i);
 ^
Main.java:10: error: illegal start of expression
????????System.out.print(" " + i);
  ^
Main.java:10: error: illegal start of expression
????????System.out.print(" " + i);
   ^
Main.java:10: error: illegal start of expression
????????System.out.print(" " + i);
    ^
Main.java:10: error: illegal start of expression
????????System.out.print(" " + i);
     ^
Main.java:10: error: illegal start of expression
????????System.out.print(" " + i);
      ^
Main.java:10: error: illegal start of expression
????????System.out.print(" " + i);
       ^
Main.java:10: error: : expected
????????System.out.print(" " + i);
                                 ^
Main.java:11: error: illegal start of expression
??????} else if (i >= 30) {
^
Main.java:11: error: illegal start of expression
??????} else if (i >= 30) {
 ^
Main.java:11: error: illegal start of expression
??????} else if (i >= 30) {
  ^
Main.java:11: error: illegal start of expression
??????} else if (i >= 30) {
   ^
Main.java:11: error: illegal start of expression
??????} else if (i >= 30) {
    ^
Main.java:11: error: illegal start of expression
??????} else if (i >= 30) {
     ^
Main.java:11: error: illegal start of expression
??????} else if (i >= 30) {
      ^
Main.java:12: error: illegal start of expression
????????a = i;
^
Main.java:12: error: illegal start of expression
????????a = i;
 ^
Main.java:12: error: illegal start of expression
????????a = i;
  ^
Main.java:12: error: illegal start of expression
????????a = i;
   ^
Main.java:12: error: illegal start of expression
????????a = i;
    ^
Main.java:12: error: illegal start of expression
????????a = i;
     ^
Main.java:12: error: illegal start of expression
????????a = i;
      ^
Main.java:12: error: illegal start of expression
????????a = i;
       ^
Main.java:12: error: : expected
????????a = i;
             ^
Main.java:13: error: illegal start of expression
????????while (a >= 30) {
^
Main.java:13: error: illegal start of expression
????????while (a >= 30) {
 ^
Main.java:13: error: illegal start of expression
????????while (a >= 30) {
  ^
Main.java:13: error: illegal start of expression
????????while (a >= 30) {
   ^
Main.java:13: error: illegal start of expression
????????while (a >= 30) {
    ^
Main.java:13: error: illegal start of expression
????????while (a >= 30) {
     ^
Main.java:13: error: illegal start of expression
????????while (a >= 30) {
      ^
Main.java:13: error: illegal start of expression
????????while (a >= 30) {
       ^
Main.java:13: error: illegal start of expression
????????while (a >= 30) {
        ^
Main.java:14: error: illegal start of expression
??????????a /= 10;
^
Main.java:14: error: illegal start of expression
??????????a /= 10;
 ^
Main.java:14: error: illegal start of expression
??????????a /= 10;
  ^
Main.java:14: error: illegal start of expression
??????????a /= 10;
   ^
Main.java:14: error: illegal start of expression
??????????a /= 10;
    ^
Main.java:14: error: illegal start of expression
??????????a /= 10;
     ^
Main.java:14: error: illegal start of expression
??????????a /= 10;
      ^
Main.java:14: error: illegal start of expression
??????????a /= 10;
       ^
Main.java:14: error: illegal start of expression
??????????a /= 10;
        ^
Main.java:14: error: illegal start of expression
??????????a /= 10;
         ^
Main.java:14: error: : expected
??????????a /= 10;
                 ^
Main.java:15: error: illegal start of expression
??????????if (a == 3 || a % 10 == 3) {
^
Main.java:15: error: illegal start of expression
??????????if (a == 3 || a % 10 == 3) {
 ^
Main.java:15: error: illegal start of expression
??????????if (a == 3 || a % 10 == 3) {
  ^
Main.java:15: error: illegal start of expression
??????????if (a == 3 || a % 10 == 3) {
   ^
Main.java:15: error: illegal start of expression
??????????if (a == 3 || a % 10 == 3) {
    ^
Main.java:15: error: illegal start of expression
??????????if (a == 3 || a % 10 == 3) {
     ^
Main.java:15: error: illegal start of expression
??????????if (a == 3 || a % 10 == 3) {
      ^
Main.java:15: error: illegal start of expression
??????????if (a == 3 || a % 10 == 3) {
       ^
Main.java:15: error: illegal start of expression
??????????if (a == 3 || a % 10 == 3) {
        ^
Main.java:15: error: illegal start of expression
??????????if (a == 3 || a % 10 == 3) {
         ^
Main.java:15: error: illegal start of expression
??????????if (a == 3 || a % 10 == 3) {
          ^
Main.java:16: error: illegal start of expression
????????????System.out.print(" " + i);
^
Main.java:16: error: illegal start of expression
????????????System.out.print(" " + i);
 ^
Main.java:16: error: illegal start of expression
????????????System.out.print(" " + i);
  ^
Main.java:16: error: illegal start of expression
????????????System.out.print(" " + i);
   ^
Main.java:16: error: illegal start of expression
????????????System.out.print(" " + i);
    ^
Main.java:16: error: illegal start of expression
????????????System.out.print(" " + i);
     ^
Main.java:16: error: illegal start of expression
????????????System.out.print(" " + i);
      ^
Main.java:16: error: illegal start of expression
????????????System.out.print(" " + i);
       ^
Main.java:16: error: illegal start of expression
????????????System.out.print(" " + i);
        ^
Main.java:16: error: illegal start of expression
????????????System.out.print(" " + i);
         ^
Main.java:16: error: illegal start of expression
????????????System.out.print(" " + i);
          ^
Main.java:16: error: illegal start of expression
????????????System.out.print(" " + i);
           ^
100 errors
only showing the first 100 errors, of 154 total; use -Xmaxerrs if you would like to see more