Language: C++

import java.util.ArrayList;
import java.util.Scanner;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> list = new ArrayList<Integer>();
		
		int n,count;
		boolean is;
		
		while(true){
			
			n = sc.nextInt();
			if(n == 0)break;
			count = 0;
			
			for(int i = 2; i < n; i++){
				is = true;
				for(int j = 2; j <= Math.sqrt(i); j++)
					if(i % j == 0){
						is = false;
						break;
					}
				
				if(is)list.add(i);
			}
			for(int i = 0; i < list.size(); i++)
				for(int j = i; j < list.size(); j++)
					if(list.get(i) + list.get(j) == n)count++;
			
			System.out.println(count);
			list.clear();
		}
		sc.close();
		}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.ArrayList;
      | ^~~~~~
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.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:15: error: expected ':' before 'static'
    5 |         public static void main(String[] args){
      |               ^~~~~~~
      |               :
a.cc:5:33: error: 'String' has not been declared
    5 |         public static void main(String[] args){
      |                                 ^~~~~~
a.cc:5:42: error: expected ',' or '...' before 'args'
    5 |         public static void main(String[] args){
      |                                          ^~~~
a.cc:37:2: error: expected ';' after class definition
   37 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:17: error: 'Scanner' was not declared in this scope
    6 |                 Scanner sc = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:7:17: error: 'ArrayList' was not declared in this scope
    7 |                 ArrayList<Integer> list = new ArrayList<Integer>();
      |                 ^~~~~~~~~
a.cc:7:27: error: 'Integer' was not declared in this scope
    7 |                 ArrayList<Integer> list = new ArrayList<Integer>();
      |                           ^~~~~~~
a.cc:7:36: error: 'list' was not declared in this scope
    7 |                 ArrayList<Integer> list = new ArrayList<Integer>();
      |                                    ^~~~
a.cc:7:47: error: 'ArrayList' does not name a type
    7 |                 ArrayList<Integer> list = new ArrayList<Integer>();
      |                                               ^~~~~~~~~
a.cc:7:66: error: expected primary-expression before ')' token
    7 |                 ArrayList<Integer> list = new ArrayList<Integer>();
      |                                                                  ^
a.cc:10:17: error: 'boolean' was not declared in this scope; did you mean 'bool'?
   10 |                 boolean is;
      |                 ^~~~~~~
      |                 bool
a.cc:14:29: error: 'sc' was not declared in this scope
   14 |                         n = sc.nextInt();
      |                             ^~
a.cc:19:33: error: 'is' was not declared in this scope; did you mean 'i'?
   19 |                                 is = true;
      |                                 ^~
      |                                 i
a.cc:20:53: error: 'Math' was not declared in this scope
   20 |                                 for(int j = 2; j <= Math.sqrt(i); j++)
      |                                                     ^~~~
a.cc:32:25: error: 'System' was not declared in this scope
   32 |                         System.out.println(count);
      |                         ^~~~~~
a.cc:35:17: error: 'sc' was not declared in this scope
   35 |                 sc.close();
      |                 ^~