Language: C++

import java.io.*;
class Report12_2
{
	public static void main(String[] args)
	{
		try
		{
			
			BufferedReader br = new
				BufferedReader(new FileReader("./score.txt"));
			PrintWriter pw = new
				PrintWriter(new BufferedWriter(new FileWriter("oddScore.txt")));

			while(true)
			{
				String str = br.readLine();
				int  num = Integer.parseInt(str);
				if (num == -1)
				{
					pw.close();
					break;
				}
				else if(num % 2 == 1)
				{
					pw.println(num);
				}
			}
			
		}

		catch(IOException e)
		{
			System.out.println("Error");
		}

		// 	System.out.println("何個の数値の和を求めますか?");
		// 	String str = br.readLine();
		// 	int  num = Integer.parseInt(str);

		// 	System.out.println(num + "個の数値の和を求めます。\n入力してください");

		// for (int i = 0; i < num; i++) {
		// 	String num_str = br.readLine();
		// 	int val = Integer.parseInt(num_str);
		// 	sum += val;
		// }

		// System.out.println(sum);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15: error: expected ':' before 'static'
    4 |         public static void main(String[] args)
      |               ^~~~~~~
      |               :
a.cc:4:33: error: 'String' has not been declared
    4 |         public static void main(String[] args)
      |                                 ^~~~~~
a.cc:4:42: error: expected ',' or '...' before 'args'
    4 |         public static void main(String[] args)
      |                                          ^~~~
a.cc:50:2: error: expected ';' after class definition
   50 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Report12_2::main(int*)':
a.cc:9:25: error: 'BufferedReader' was not declared in this scope
    9 |                         BufferedReader br = new
      |                         ^~~~~~~~~~~~~~
a.cc:11:25: error: 'PrintWriter' was not declared in this scope
   11 |                         PrintWriter pw = new
      |                         ^~~~~~~~~~~
a.cc:16:33: error: 'String' was not declared in this scope
   16 |                                 String str = br.readLine();
      |                                 ^~~~~~
a.cc:17:44: error: 'Integer' was not declared in this scope
   17 |                                 int  num = Integer.parseInt(str);
      |                                            ^~~~~~~
a.cc:17:61: error: 'str' was not declared in this scope; did you mean 'std'?
   17 |                                 int  num = Integer.parseInt(str);
      |                                                             ^~~
      |                                                             std
a.cc:20:41: error: 'pw' was not declared in this scope
   20 |                                         pw.close();
      |                                         ^~
a.cc:25:41: error: 'pw' was not declared in this scope
   25 |                                         pw.println(num);
      |                                         ^~
a.cc:31:23: error: 'IOException' does not name a type
   31 |                 catch(IOException e)
      |                       ^~~~~~~~~~~
a.cc:33:25: error: 'System' was not declared in this scope
   33 |                         System.out.println("Error");
      |                         ^~~~~~