criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util;

public class C {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int count = 2;
        for (int i = 2; i <a ; i++) {
            if (a%i==0)
            {
            count++;
            }

        }
        System.out.println(count);
    }
}



Compiler output:
Main.java:3: error: class C is public, should be declared in a file named C.java
public class C {
       ^
Main.java:1: error: cannot find symbol
import java.util;
           ^
  symbol:   class util
  location: package java
Main.java:5: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class C
Main.java:5: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
                              ^
  symbol:   class Scanner
  location: class C
4 errors
Language: Java

import java.util.*;
import java.io.*;

class Main
{
	public static void main(String[] args)
	{
		Boorean[] bit = new Boorean[1000000];
		Arrays.fill(bit, true);
		bit[0] = false;
		bit[1] = false;

		for(int i=2; i<1000; ++i){
			if(bit[i]){
				for(int j=i*2; j<1000000; j+=i)
					bit[j] = false;
			}
		}

		int[] prime = new int[1000000];
		prime[0] = 0;
		for(int i=1; i<1000000; ++i)
			prime[i] = prime[i-1] + (bit[i] ? 1 : 0);

		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String str;
		try{
			while((str = bf.readLine()) != null){
				int n = Integer.parseInt(str);
				System.out.println(prime[n]);
			}
		}
		catch(IOException ex){
			System.out.println(ex);
		}
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
		Boorean[] bit = new Boorean[1000000];
		^
  symbol:   class Boorean
  location: class Main
Main.java:8: error: cannot find symbol
		Boorean[] bit = new Boorean[1000000];
		                    ^
  symbol:   class Boorean
  location: class Main
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {
    public static void main(String args[]) throws Exception {
        final BufferedReader br = new BufferedReader
                                 (new InputStreamReader(System.in));
        String inputString;

        while((inputString = br.readLine()) != null) {
            if(inputString.length() == 0)
                break;

/*            final int n = Integer.parseInt(inputString);
            ArrayList<Integer> ints = new ArrayList<Integer>(0);

            for(int i = 2; i <= n; i++)
                ints.add(i);

            int result = 0;
            int tmp = ints.get(0);

            while(tmp * tmp < ints.get(ints.size() - 1)) {
                tmp = ints.get(0);
                for(int i = 0; i < ints.size();)
                    if(ints.get(i) % tmp == 0)
                        ints.remove(i);
                    else
                        i++;
                result++;
            }*/

            result += ints.size();

            System.out.println(result);
        }
    }
}

Compiler output:
Main.java:34: error: cannot find symbol
            result += ints.size();
            ^
  symbol:   variable result
  location: class Main
Main.java:34: error: cannot find symbol
            result += ints.size();
                      ^
  symbol:   variable ints
  location: class Main
Main.java:36: error: cannot find symbol
            System.out.println(result);
                               ^
  symbol:   variable result
  location: class Main
3 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {
    public static void main(String args[]) throws Exception {
        final BufferedReader br = new BufferedReader
                                 (new InputStreamReader(System.in));
        String inputString;

        while((inputString = br.readLine()) != null) {
            if(inputString.length() == 0)
                break;

/*            final int n = Integer.parseInt(inputString);
            ArrayList<Integer> ints = new ArrayList<Integer>(0);

            for(int i = 2; i <= n; i++)
                ints.add(i);

            int result = 0;
            int tmp = ints.get(0);

            while(tmp * tmp < ints.get(ints.size() - 1)) {
                tmp = ints.get(0);
                for(int i = 0; i < ints.size();)
                    if(ints.get(i) % tmp == 0)
                        ints.remove(i);
                    else
                        i++;
                result++;
            }

            result += ints.size();
*/
            System.out.println(result);
        }
    }
}

Compiler output:
Main.java:36: error: cannot find symbol
            System.out.println(result);
                               ^
  symbol:   variable result
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.LinkedList;

public class Main {
    public static void main(String args[]) throws Exception {
        final BufferedReader br = new BufferedReader
                                 (new InputStreamReader(System.in));
        String inputString;

        while((inputString = br.readLine()) != null) {
            if(inputString.length() == 0)
                break;

            final int n = Integer.parseInt(inputString);
            LinkedList<Integer> ints = new LinkedList<Integer>();

n=Math.min(n,1000000);

            for(int i = 2; i <= n; i++)
                ints.add(i);

            int result = 0;
            int tmp = ints.get(0);

            while(tmp * tmp < ints.get(ints.size() - 1)) {
                tmp = ints.get(0);
                for(int i = 0; i < ints.size();)
                    if(ints.get(i) % tmp == 0)
                        ints.remove(i);
                    else
                        i++;
                result++;
            }

            result += ints.size();

            System.out.println(result);
        }
    }
}

Compiler output:
Main.java:18: error: cannot assign a value to final variable n
n=Math.min(n,1000000);
^
1 error
Language: Java

public class Main {
	static Scanner sc = new Scanner(System.in);
	static int[] prime;
	static int n;
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		while(read()){
			slove();
		}
	}
	static boolean read(){
		if(sc.hasNextInt() != true)
			return false;
		n = sc.nextInt();
		return true;
	}
	static void Prime(int a){
		prime = new int[a+1];
		for(int i = 1; i < prime.length; i++)
			prime[i] = 1;
		
		for(int i = 2; i < prime.length; i++){
			if(prime[i] == 1){
				for(int j = i; i*j < prime.length; j++)
				prime[i*j] = 0;	
			}
		}
	}
	
	static void slove(){
		int count = 0;
		Prime(n);
		for(int i = 2; i < prime.length; i++){
			if(prime[i] == 1)
				count++;
		}
		System.out.println(count);
	}
}

Compiler output:
Main.java:2: error: cannot find symbol
	static Scanner sc = new Scanner(System.in);
	       ^
  symbol:   class Scanner
  location: class Main
Main.java:2: error: cannot find symbol
	static Scanner sc = new Scanner(System.in);
	                        ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class PrimeNumber{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		boolean[] sieve = new boolean[N + 1];
		for (int i = 2; i <= N; i++) {
			if (sieve[i] == false) {
				for (int j = i + i; j <= N; j += i) {
					sieve[j] = true;
				}
			}
		}
		int result = 0;
		for (boolean n : sieve) {
			if (n == false) {
				result++;
			}
		}
		System.out.println(result - 2);
	}
}

Compiler output:
Main.java:3: error: class PrimeNumber is public, should be declared in a file named PrimeNumber.java
public class PrimeNumber{
       ^
1 error
Language: Java

import java.io.*
import java.io.*
import java.util.*

    public class Main {
    public static void main(String[] args)
    throws java.io.IOException{
        Scanner scan = new Scanner(System.in);

        while(scan.hasNext()){
            int count=1;
            int n = scan.nextInt();
            boolean [] prime = new boolean [n+1];
            for(bool b :prime) 
                b = true;

            for(int i=0;i<=n;i++){
                if(prime[i]){
                    count++;
                    int p =2 *i +3;
                    for(int k=i+p;k<+n;k+=p)prime[k]=false;
                }
            }
            System.out.printl(count);
        }   
    }
~      

Compiler output:
Main.java:1: error: ';' expected
import java.io.*
                ^
Main.java:2: error: ';' expected
import java.io.*
                ^
Main.java:3: error: ';' expected
import java.util.*
                  ^
Main.java:27: error: illegal start of type
~      
^
Main.java:27: error: reached end of file while parsing
~      
 ^
5 errors
Language: Java

import java.io.*;
import java.util.*;

    public class Main {
    public static void main(String[] args)
    throws java.io.IOException{
        Scanner scan = new Scanner(System.in);

        while(scan.hasNext()){
            int count=1;
            int n = scan.nextInt();
            boolean [] prime = new boolean [n+1];
            for(bool b :prime) 
                b = true;

            for(int i=0;i<=n;i++){
                if(prime[i]){
                    count++;
                    int p =2 *i +3;
                    for(int k=i+p;k<+n;k+=p)prime[k]=false;
                }
            }
            System.out.println(count);
        }   
    }
~      

Compiler output:
Main.java:26: error: illegal start of type
~      
^
Main.java:26: error: reached end of file while parsing
~      
 ^
2 errors
Language: Java

import java.io.*;
import java.util.*;

    public class Main {
    public static void main(String[] args)
    throws java.io.IOException{
        Scanner scan = new Scanner(System.in);

        while(scan.hasNext()){
            int count=1;
            int n = scan.nextInt();
            boolean [] prime = new boolean [n+1];
            for(boolean b :prime) 
                b = true;

            for(int i=0;i<=n;i++){
                if(prime[i]){
                    count++;
                    int p =2 *i +3;
                    for(int k=i+p;k<+n;k+=p)prime[k]=false;
                }
            }
            System.out.println(count);
        }   
    }

Compiler output:
Main.java:25: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

import java.io.*
import java.util.*

    public class Main {
    public static void main(String[] args)
    throws java.io.IOException{
        Scanner scan = new Scanner(System.in);

        while(scan.hasNext()){
            int count =1;
            int n = scan.nextInt();
            //if(n==1){System.out.println(0);continue;}
            boolean [] prime = new boolean [n+1];
            for(boolean b :prime)
                b = true;

            for(int i=2;i<=n;i++){
                if(prime[i]){
                    count++;

                    for(int k=i*2;k<=n;k+=i)prime[k]=false;
                }
            }
            System.out.printl(count);
        }
    }
    }

Compiler output:
Main.java:1: error: ';' expected
import java.io.*
                ^
Main.java:2: error: ';' expected
import java.util.*
                  ^
2 errors
Language: Java

import java.io.*;
import java.util.*;

    public class Main {
    public static void main(String[] args)
    throws java.io.IOException{
        Scanner scan = new Scanner(System.in);

        while(scan.hasNext()){
            int count =0;
            int n = scan.nextInt();
            if(n==1){System.out.println(0);continue;}
            boolean [] prime = new boolean [n+1];
            for(int i =0;i<=n;i++){
                prime[i]=true;
            }

            for(int i=2;i<=n;i++){
                if(prime[i]){
                    count++;
                    for(int k=i*2;k<=n;k+=i)prime[k]=false;
                }
            }
            System.out.println(count);
        }
    }
    }
~        

Compiler output:
Main.java:28: error: class, interface, enum, or record expected
~        
^
1 error
Language: Java

import java.util.Scanner;
public class Prime {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		boolean[] n = new boolean[1000001] ;
		for(int i = 0;i< 1000000;i++){
			if(i <=1){
				n[i] = false;} else
					if(i > 1){
						n[i] = true;
					}
			}
	for(int i = 2;i < 1000000;i++){
		if(n[i] == true){
			for(int j = 2;j*i < 1000000;j++){
				n[j*i] = false;
			}
		}
	}
		Scanner scan = new Scanner(System.in);
		int N;
	for(;;){
		N = scan.nextInt();
		 int count = 0;

		for(int i = 0;i <= N;i++){
			if(n[i] == true){count = count +1;
		}
		}
			System.out.println(count);

		}

	}
}

Compiler output:
Main.java:2: error: class Prime is public, should be declared in a file named Prime.java
public class Prime {
       ^
1 error
Language: Java

import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=1000000;
        boolean[] N=new boolean[n+1];
        for(int i=2;i*i<=n;i++){
            if(!N[i]){
                for(int j=i+i;j<=n;j+=i){
                    N[j]=true;
                }
            }
        }
        while(sc.hasNextInt()){
            n=sc.nextInt();
            int ans=0;
            for(int i=2;i<=n;i++){
                if(!N[i]){
                    ans++;
                }
            }
            System.out.println(ans);

Compiler output:
Main.java:22: error: reached end of file while parsing
            System.out.println(ans);
                                    ^
1 error
Language: Java

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

public class Main2 {
	
	private static void printAnswer(ArrayList<Integer> list, ArrayList<Integer> answer){
		if(answer.size()>0 && 
				answer.get(answer.size()-1)*answer.get(answer.size()-1)>list.get(list.size()-1)){
			for(int i=0;i<answer.size();i++)
				System.out.print(answer.get(i)+" ");
			for(int i=0;i<list.size();i++)
				System.out.print(list.get(i)+" ");
			return;
		}
		answer.add(list.get(0));
		for(int i=0;i<list.size();i++){
			if(list.get(i)%answer.get(answer.size()-1)==0){
				list.remove(i);
				i--;
			}
		}
		printAnswer(list, answer);
	}
	
	public static void main(String arg[]){
		Scanner scan = new Scanner(System.in);
		ArrayList<Integer> list = new ArrayList<Integer>();
		ArrayList<Integer> answer = new ArrayList<Integer>();
		int a;
		while(scan.hasNext()){
			a = scan.nextInt();
			for(int i=2;i<=a;i++)
				list.add(i);
			printAnswer(list, answer);
		}
	}
}

Compiler output:
Main.java:4: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
       ^
1 error
Language: Java

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

public class Main{
	
	private static void printAnswer(ArrayList<Integer> list, ArrayList<Integer> answer){
		if(answer.size()>0 && 
				answer.get(answer.size()-1)*answer.get(answer.size()-1)>list.get(list.size()-1)){
			int sum = 0;
			for(int i=0;i<answer.size();i++)
				sum++;
			for(int i=0;i<list.size();i++)
				sum++;
			System.out.println(sum);
			return;
		}
		answer.add(list.get(0));
		for(int i=0;i<list.size();i++){
			if(list.get(i)%answer.get(answer.size()-1)==0){
				list.remove(i);
				i--;
			}
		}
		printAnswer(list, answer);
  * It depends on the problem 



Source Code:


	}
	
	public static void main(String arg[]){
		Scanner scan = new Scanner(System.in);
		ArrayList<Integer> list = new ArrayList<Integer>();
		ArrayList<Integer> answer = new ArrayList<Integer>();
		int a;
		while(scan.hasNext()){
			a = scan.nextInt();
			for(int i=2;i<=a;i++)
				list.add(i);
			printAnswer(list, answer);
		}
	}
}

Compiler output:
Main.java:25: error: illegal start of expression
  * It depends on the problem 
  ^
Main.java:25: error: ';' expected
  * It depends on the problem 
      ^
Main.java:25: error: ';' expected
  * It depends on the problem 
                 ^
Main.java:25: error: ';' expected
  * It depends on the problem 
                             ^
Main.java:29: error: ';' expected
Source Code:
           ^
5 errors
Language: Java

import java.util.*;

public class nine{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long n;
		int count;
		boolean[] flag = new boolean[100001];
		
		while(true){
			count = 0;
			if(!sc.hasNext())break;
			n = sc.nextInt();
			
			for(int i=0;i<=n;i++)flag[i] = true;
			
			for(int i=2;i<=Math.sqrt(n)+1;i++){
				if(!flag[i])continue;
				for(int j=i*2;j<=n;j+=i){
					flag[j] = false;
				}
			}
			for(int i=2;i<=n;i++){
				if(flag[i])++count;
			}
			System.out.println(count);
		}
	}
}

Compiler output:
Main.java:3: error: class nine is public, should be declared in a file named nine.java
public class nine{
       ^
1 error
Language: Java

import java.util.Scanner;

public class Prime_java {

	static final Integer N = 1000010;
	static Boolean[] prime = new Boolean[N];

	public static void makePrime(){
		for(int i = 0; i < N; i++) prime[i] = true;
		prime[0] = false;
		prime[1] = false;
		for(int i = 0; i * i <= N; i++){
			if(!prime[i]) continue;
			for(int j = i + i; j < N; j += i) prime[j] = false;
		}
	}

	public static void main(String[] args) {
		makePrime();
		Scanner s = new Scanner(System.in);
		while(s.hasNextInt()){
			int n = s.nextInt();
			int cnt = 0;
			for(int i = 0; i <= n; i++) if(prime[i]) cnt++;
			System.out.println(cnt);
		}
		s.close();
	}
}

Compiler output:
Main.java:3: error: class Prime_java is public, should be declared in a file named Prime_java.java
public class Prime_java {
       ^
1 error
Language: Java

#include <iostream>
using namespace std;
int main(void){
	bool a[600001];
	while(!cin.eof()){
		int n;
		cin >> n;

		for(int i = 2; i <= n; i++){
			a[i] = true;
		}

		for(int i = 2; i * i <= n; i++){
			if(!a[i]) continue;
			for(int j = i + 1; j <= n; j++)
				if(!(j % i)){
					a[j] = false;
				}
		}

		int ans = 0;
		for(int i = 2; i <= n; i++)
			if(a[i]){
				ans++;
			}
		cout << ans << endl;
	}
			
	return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include <iostream>
         ^
Main.java:7: error: not a statement
		cin >> n;
		    ^
Main.java:26: error: not a statement
		cout << ans << endl;
		            ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
int main(void){
^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: <identifier> expected
int main(void){
             ^
Main.java:4: error: ']' expected
	bool a[600001];
	       ^
7 errors
Language: Java

#include<iostream>
#include<stdio.h>
#include<math.h>
int prime(int x)
{
    int i,j=1;
    int l;
    l=sqrt(x);
    for(i=2;i<=l+1;i++)
    {
        if(x%i==0)
        {
            j=0;
            break;

        }
    }
    //if(j==0)return 0;
    if(x==2||j==1) return 1;


}
using namespace std;
int main()
{
    int n;//=999999;
    //cout<<n<<endl;
    int j,i;int s=0;
    while(cin>>n)
    {
       s=0;

        for(i=2;i<=n;i++)
        {
            if(prime(i)==1){s++;}//cout<<i<<endl;}
        }
        cout<<s<<endl;

    }



    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include<stdio.h>
^
Main.java:3: error: illegal character: '#'
#include<math.h>
^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
    int l;
    ^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: class, interface, enum, or record expected
    l=sqrt(x);
    ^
Main.java:9: error: class, interface, enum, or record expected
    for(i=2;i<=l+1;i++)
    ^
Main.java:9: error: class, interface, enum, or record expected
    for(i=2;i<=l+1;i++)
            ^
Main.java:9: error: class, interface, enum, or record expected
    for(i=2;i<=l+1;i++)
                   ^
Main.java:14: error: class, interface, enum, or record expected
            break;
            ^
Main.java:16: error: class, interface, enum, or record expected
        }
        ^
Main.java:22: error: class, interface, enum, or record expected
}
^
Main.java:37: error: not a statement
        cout<<s<<endl;
               ^
12 errors
Language: Java

import java.util.Scanner;
import java.util.HashSet;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			int n = scan.nextInt();
			HashSet<int> set = new HashSet<int>;
			for (int i = 2; i < n; i++) {
				set.add(i);
			}
			for (int i = 2; i < n; i++) {
				if (!set.contains(i)) continue;
				for (int j = i * 2; j < n; j += i) {
					set.remove(j);
				}
			}
			System.out.println(set.size());
		}
	}
}

Compiler output:
Main.java:10: error: '(' or '[' expected
			HashSet<int> set = new HashSet<int>;
			                                   ^
1 error
Language: Java

import java.util.Scanner;
import java.util.HashSet;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			int n = scan.nextInt();
			HashSet<int> set = new HashSet<int>();
			for (int i = 2; i < n; i++) {
				set.add(i);
			}
			for (int i = 2; i < n; i++) {
				if (!set.contains(i)) continue;
				for (int j = i * 2; j < n; j += i) {
					set.remove(j);
				}
			}
			System.out.println(set.size());
		}
	}
}

Compiler output:
Main.java:10: error: unexpected type
			HashSet<int> set = new HashSet<int>();
			        ^
  required: reference
  found:    int
Main.java:10: error: unexpected type
			HashSet<int> set = new HashSet<int>();
			                               ^
  required: reference
  found:    int
2 errors
Language: Java

import java.util.Scanner;
import java.util.HashSet;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while (scan.hasNext()) {
			int n = scan.nextInt();
			boolean[] isPrime = new boolean[n + 1];
			for (int i = 2; i <= n; i++) {
				isPrime[i] = true
			}
			for (int i = 2; i <= n; i++) {
				if (!isPrime[i]) continue;
				for (int j = i * 2; j <= n; j += i) {
					isPrime[i] = false;
				}
			}
			int count = 0;
			for (int i = 2; i <= n; i++) {
				if (isPrime[i]) count++;
			}
			System.out.println(count);
		}
	}
}

Compiler output:
Main.java:12: error: ';' expected
				isPrime[i] = true
				                 ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String args[] ) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true){
String num=br.readLine();
if(num==null){
break;
}
int n = Integer.parseInt(num);
boolean check=true;
for(int m=2;m<n-1;m++){
if(n%m==0){
check=false;
break;
}
}
if(check==true){
System.out.println(n);
}
}
}
return 0;
}
}
}

Compiler output:
Main.java:24: error: illegal start of type
return 0;
^
Main.java:26: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String args[] ) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true){
String num=br.readLine();
if(num==null){
break;
}
int n = Integer.parseInt(num);
boolean check=true;
for(int m=2;m<n-1;m++){
if(n%m==0){
check=false;
break;
}
}
if(check==true){
System.out.println(n);
}
}
}
}
}
}

Compiler output:
Main.java:25: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String args[] ) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true){
String num=br.readLine();
if(num==null){
break;
}
int n = Integer.parseInt(num);
boolean check=true;
for(int m=2;m<n-1;m++){
if(n%m==0){
check=false;
break;
}
}
if(check==true){
System.out.println(n);
}
}
}
}
}

Compiler output:
Main.java:25: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

import java.util.Scanner;

public class Main09{
	public static void main(String[] args){
	    while(true){
		Scanner in = new Scanner(System.in);
		String x = in.nextLine();
		int a = Integer.parseInt(x);
		int n =0;
		int[] p = new int[(a+1)];
		int[] q = new int[(a+1)];
		for(int i =1;i<=a;i++){
			for(int j=1;j<i;j++){
				if(i%j == 0){
					p[i] += 1;
				}else{
					q[i] += 1;
				}
			}
		}
		for(int i =1;i<=a;i++){
			if(p[i] == 1){
				n += 1;
			}
		}
		System.out.println(n);
	    }
	}
}

Compiler output:
Main.java:3: error: class Main09 is public, should be declared in a file named Main09.java
public class Main09{
       ^
1 error
Language: Java

public class Main{
	public static void main(String[] args){
	    while(true){
		Scanner in = new Scanner(System.in);
		String x = in.nextLine();
		int a = Integer.parseInt(x);
		int n =0;
		int[] p = new int[(a+1)];
		int[] q = new int[(a+1)];
		for(int i =1;i<=a;i++){
			for(int j=1;j<i;j++){
				if(i%j == 0){
					p[i] += 1;
				}else{
					q[i] += 1;
				}
			}
		}
		for(int i =1;i<=a;i++){
			if(p[i] == 1){
				n += 1;
			}
		}
		System.out.println(n);
	    }
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner in = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner in = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.io.*;

public class Main09 {
	public static void main(String[] args){
		BufferedReader reader =new BufferedReader(new InputStreamReader(System.in));
		String line;
		try{
			while((line=reader.readLine()) != null){
				int x =Integer.parseInt(line);
				int[] p=new int[x+1];
				int[] q=new int[x+1];
				int n=0;
				for(int i =0;i<=x;i++){
					for(int j =1;j<=i;j++){
						if(i%j ==0){
							p[i] += 1;
						}else{
							q[i] += 1;
						}
					}
				}
				for(int i = 1;i<=x;i++){
					if(p[i] == 2){
					n += 1;
					}
				}
				System.out.println(n);
			}
		}catch(IOException e){
			System.out.println(e);
			System.exit(0);
		}catch(NumberFormatException e){
			System.exit(0);
		}
	}
}

Compiler output:
Main.java:3: error: class Main09 is public, should be declared in a file named Main09.java
public class Main09 {
       ^
1 error
Language: Java

import java.io.*;

public class Main {
	public static void main(String[] args){
		BufferedReader reader =new BufferedReader(new InputStreamReader(System.in));
		String line;
		try{
			while((line=reader.readLine()) != null){
				int x =Integer.parseInt(line);
				int[] p=new int[x+1];
				int[] q=new int[x+1];
				int n=0;
				for(int i =0;i<=x;i++){
					for(int j =1;j<=i;j++){
						if(i%j ==0){
							p[i] += 1;
						}else{
							q[i] += 1;
						}
					}
				}
				for(int i = 1;i<=x;i++){
					if(p[i] == 2){
					n += 1;
					}
				}
				System.out.println(n);
			}
			return 0;
		}catch(IOException e){
			System.out.println(e);
			System.exit(0);
		}catch(NumberFormatException e){
			System.exit(0);
		}
	}
}

Compiler output:
Main.java:29: error: incompatible types: unexpected return value
			return 0;
			       ^
1 error
Language: Java

import java.io.*;

public class Niam {
	public static void main(String[] args){
	        try{
			BufferedReader reader =new BufferedReader(new InputStreamReader(System.in));
			String line;
			while((line=reader.readLine()) != null){
				int x =Integer.parseInt(line);
				int[] p=new int[x+1];
				int n=0;
				for(int i =0;i<=x;i++){
					for(int j =1;j<=i;j++){
						if(i%j ==0){
							p[i] += 1;
						}
					}
					if(p[i] == 2){
						n += 1;
					}
				}
				System.out.println(n);
			}
			reader.close();
		}catch(IOException e){
			System.out.println(e);
			System.exit(0);
		}catch(NumberFormatException e){
			System.exit(0);
		}
	}
}

Compiler output:
Main.java:3: error: class Niam is public, should be declared in a file named Niam.java
public class Niam {
       ^
1 error
Language: C

#include<stdio.h>
#include<math.h>
#include<stdbool.h>

static int count = 1;
static int prime[5000] = {2,3};
static bool primebool[5000] = {true,true};

int primesearch(int);
void primecount(int,int);
void reset();

int main(){
  int n;
  while(scanf("%d", &n) != EOF){
    if (n>1){
      primecount(0,n);
      printf("%d\n", count);
      reset();
    }
    else{
      printf("0\n");
    }
  }
  return 0;
}

void primecount(int i,int n){
  if (!primebool[i]){
    prime[i] = primesearch(prime[i-1]+2);
    primebool[i] = true;
  }
  if (prime[i]<=n){
    count++;
    primecount(i+1,n);
  }
}

int primesearch(int x){
  int i,sq;
  sq = (int)sqrt(x);
  for(i=3;i<=sq;i=i+2){
    if(x%i==0){
      return primesearch(x+2);
    }
  }
  return x;
}


Compiler output:
/usr/bin/ld: /tmp/ccywatTb.o: in function `main':
main.c:(.text+0x43): undefined reference to `reset'
/usr/bin/ld: /tmp/ccywatTb.o: in function `primesearch':
main.c:(.text+0x14f): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

include<stdio.h>
#include<math.h>
#include<stdbool.h>

static int count = 1;

bool primebool(int);
void primecount(int,int);
void reset();

int main(){
  int n;
  while(scanf("%d", &n) != EOF){
    if (n>2){
      primecount(3,n);
      printf("%d\n", count);
      reset();
    }
    else if (n==2){
      printf("1\n");
    }
    else{
      printf("0\n");
    }
  }
  return 0;
}

void primecount(int i, int n){
  if (i<=n){
    if(primebool(i)){
      count++;
    }
    primecount(i+2,n);
  }
}

bool primebool(int x){
  int i,sq;
  sq = (int)sqrt(x);
  for(i=3;i<=sq;i=i+2){
    if(x%i==0){
      return false;
    }
  }
  return true;
}

void reset(){
    count = 1;
}



Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   13 |   while(scanf("%d", &n) != EOF){
      |         ^~~~~
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    3 | #include<stdbool.h>
  +++ |+#include <stdio.h>
    4 | 
main.c:13:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   13 |   while(scanf("%d", &n) != EOF){
      |         ^~~~~
main.c:13:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:13:28: error: 'EOF' undeclared (first use in this function)
   13 |   while(scanf("%d", &n) != EOF){
      |                            ^~~
main.c:13:28: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:13:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   16 |       printf("%d\n", count);
      |       ^~~~~~
main.c:16:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:16:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   20 |       printf("1\n");
      |       ^~~~~~
main.c:20:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:23:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   23 |       printf("0\n");
      |       ^~~~~~
main.c:23:7: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main() {
	while (true) {
		int n, ans = 0;
		scanf("%d", &n);
		if (n >= 2)ans++;
		for (int i = 3; i <= n; i += 2) {
			int h = 1;
			for (int j = 3; j*j <= i&&h==1; j += 2) {
				if (i%j == 0)h = 0;
			}
			ans += h;
		}
		printf("%d\n", ans);
	}
}


Compiler output:
main.c: In function 'main':
main.c:5:16: error: 'true' undeclared (first use in this function)
    5 |         while (true) {
      |                ^~~~
main.c:3:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
    5 |         while (true) {
      |                ^~~~
Language: C


#include<stdio.h>

int main() {
	while (true) {
		int n, ans = 0;
		scanf("%d", &n);
		if (n >= 2)ans++;
		for (int i = 3; i <= n; i += 2) {
			int h = 1;
			for (int j = 3; j*j <= i&&h==1; j += 2) {
				if (i%j == 0)h = 0;
			}
			ans += h;
		}
		printf("%d\n", ans);
	}
}


Compiler output:
main.c: In function 'main':
main.c:5:16: error: 'true' undeclared (first use in this function)
    5 |         while (true) {
      |                ^~~~
main.c:3:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
    5 |         while (true) {
      |                ^~~~
Language: C

#include<stdio.h>

int Isprime(int n);

int main(){
int n,i,cnt,times;
times=0;
while((scanf("%d\n",&n)!=EOF)||times<30){
 cnt=0;
 for(i=1;i<=n;i++){
  cnt+=Isprime(i);
 }
 printf("%d\n",cnt);
 times++;
}


int Isprime(int n){
int i,isp;
isp=1;
if(n==1){
 isp=0;
}
for(i=2;i<n;i++){ 
 if(n%i==0){
  isp=0;
 }
}
return isp;
}

Compiler output:
main.c: In function 'main':
main.c:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

#include<stdio.h>

int Isprime(int n);

int main(){
int n,i,cnt,times;
times=0;
while((scanf("\n%d",&n)!=EOF)||(times<30)){
 cnt=0;
 for(i=1;i<=n;i++){
  cnt+=Isprime(i);
 }
 printf("%d\n",cnt);
 times++;
}


int Isprime(int n){
int i,isp;
isp=1;
if(n==1){
 isp=0;
}
for(i=2;i<n;i++){ 
 if(n%i==0){
  isp=0;
 }
}
return isp;
}

Compiler output:
main.c: In function 'main':
main.c:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

#include<stdio.h>

int Isprime(int n);

int main(){
int n,i,cnt,times;
times=0;
while((scanf("\n%d",&n)!=EOF)||(times<30)){
 cnt=0;
 for(i=1;i<=n;i++){
  cnt+=Isprime(i);
 }
 printf("%d\n",cnt);
 times++;
}
return 0;
}


int Isprime(int n){
int i,isp;
int prime[167];
prime[167]={2, 3, 4, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997};
isp=1;
if((n==1)||){
 isp=0;
}
for(i=0;i=<167;i++){ 
 if(n%prime[i]==0){
  isp=0;
  break;
 }
}
return isp;
}

Compiler output:
main.c: In function 'Isprime':
main.c:23:12: error: expected expression before '{' token
   23 | prime[167]={2, 3, 4, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997};
      |            ^
main.c:25:12: error: expected expression before ')' token
   25 | if((n==1)||){
      |            ^
main.c:28:11: error: expected expression before '<' token
   28 | for(i=0;i=<167;i++){
      |           ^
Language: C

#include<stdio.h>

int Isprime(int n);

int main(){
int n,i,cnt,times;
int prime[167];
prime[167]={2, 3, 4, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997};
times=0;
while((scanf("\n%d",&n)!=EOF)||(times<30)){
 cnt=0;
 for(i=0;i<=167;i++){
  if((n<prime[i])&&(cnt==0)){
   cnt=i;
  }
 }
 printf("%d\n",cnt);
 times++;
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:12: error: expected expression before '{' token
    8 | prime[167]={2, 3, 4, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997};
      |            ^
Language: C

#include<stdio.h>

int Isprime(int n);

int main(){
int n,i,cnt,times;
int prime[167];
prime={2, 3, 4, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997};
times=0;
while((scanf("\n%d",&n)!=EOF)||(times<30)){
 cnt=0;
 for(i=0;i<=167;i++){
  if((n<prime[i])&&(cnt==0)){
   cnt=i;
  }
 }
 printf("%d\n",cnt);
 times++;
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:7: error: expected expression before '{' token
    8 | prime={2, 3, 4, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997};
      |       ^
Language: C

#include<stdio.h>

int Isprime(int n);

int main(){
int n,i,cnt,times;
int prime[168];
prime={2, 3, 4, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997};
times=0;
while((scanf("\n%d",&n)!=EOF)||(times<30)){
 cnt=0;
 for(i=0;i<=167;i++){
  if((n<prime[i])&&(cnt==0)){
   cnt=i;
  }
 }
 printf("%d\n",cnt);
 times++;
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:7: error: expected expression before '{' token
    8 | prime={2, 3, 4, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997};
      |       ^
Language: C

int main () {
	int a,b=9,c=9,d=9,e=9,f=0,g=1000,h;
	int kaisu[1000];
	
	for(g=0;g<1000;g++){kaisu[g]=1;}

	while(scanf("%d",&a)!=EOF){
		if(a==1)kaisu[f]--;

		for(b=3;b<=a;b+=2){

			/*for(c=2;c<b;c++){
//				printf("%d",c);
				if(b%c==0){ break;}
			}
			if(c>=b){
				kaisu[f]++;
			}
		*/
			if(IsPrime(b)==1)kaisu[f]++;

		}
		f++;
	}

	for(h=0;h<f;h++){
		printf("%d\n",kaisu[h]);
	}
	

	//scanf("%d",&a);
	return 0;
}

int IsPrime(int n){
    int i;
 
    if(n < 2)
        return 0;
    else if(n == 2)
        return 1;
 
    if(n % 2 == 0)
        return 0;
 
    for(i = 3; i <= n / i; i += 2)
         if(n % i == 0)
            return 0;
    return 1;
}

Compiler output:
main.c: In function 'main':
main.c:7:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |         while(scanf("%d",&a)!=EOF){
      |               ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main () {
main.c:7:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |         while(scanf("%d",&a)!=EOF){
      |               ^~~~~
main.c:7:15: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:31: error: 'EOF' undeclared (first use in this function)
    7 |         while(scanf("%d",&a)!=EOF){
      |                               ^~~
main.c:7:31: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:7:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:28: error: implicit declaration of function 'IsPrime' [-Wimplicit-function-declaration]
   20 |                         if(IsPrime(b)==1)kaisu[f]++;
      |                            ^~~~~~~
main.c:27:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   27 |                 printf("%d\n",kaisu[h]);
      |                 ^~~~~~
main.c:27:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:27:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:27:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <cstdio>
#include <vector>

using namespace std;

int main()
{
	int n;
	
	while (scanf("%d", &n) != EOF){
		vector<int> prime;
		
		if (n >= 2){
			prime.push_back(2);
		}
		for (int i = 3; i <= n; i++){
			int j;
			for (j = 0; j < prime.size(); j++){
				if (i % prime[j] == 0){
					break;
				}
			}
			if (j == prime.size()){
				prime.push_back(i);
			}
		}
		printf("%d\n", prime.size());
	}
	
	return 0;
}

Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>

using namespace std;


int main(){
    int j,s[1000000]=0;
    long i,n,d=0;
    
    for(i=3;i<1000000;i++){
        for(j=2;j*j<i;j+=2){
            if(j%i==0){
                d--;
                break;
            }
            if(j==2)
                j=1;
        }
        s[i] = ++d;
    }
    
    while(EOF != scanf("%d",&n)){
        printf("%d\n",&d);
    }
    
    
    return 0;
}

Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int z[30],count[30];
int main(void)
{
	int i,j,n=0,k;
	
	for (i=0; z[i] != ; i++){
		scanf("%d", &z[i]);
		n++;
	}
	printf("nの個数%d\n", n);
	
	for (n -= 1; n>=0; n--){
		for (i=2; i*i<=z[n]; i++){
			if (z[n]%i != 0){
				count[n]++;
			}
		}
		printf("%d\n", count[n]);
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:27: error: expected expression before ';' token
    8 |         for (i=0; z[i] != ; i++){
      |                           ^
Language: C

#include<stdio.h>
#include<math.h>
#define N 1000000

bool is_prime[N];


int sieve(int n){
	int p=0;
	for(int i=0;i<=n;i++)
	   is_prime[i]=true;
	is_prime[0]=is_prime[1]=false;
	for(int i=0;i<=n;i++){
		if(is_prime[i]){
			p++;
			for(int j=i*2;j<=n;j=j+i){
				is_prime[j]=false;
			}
		}
	}
	return p;
}

int main()
{
	int n;
	while(scanf("%d",&n)!=EOF){
		printf("%d\n",sieve(n));
	}
}

Compiler output:
main.c:5:1: error: unknown type name 'bool'
    5 | bool is_prime[N];
      | ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include<math.h>
  +++ |+#include <stdbool.h>
    3 | #define N 1000000
main.c: In function 'sieve':
main.c:11:24: error: 'true' undeclared (first use in this function)
   11 |            is_prime[i]=true;
      |                        ^~~~
main.c:11:24: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:11:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:33: error: 'false' undeclared (first use in this function)
   12 |         is_prime[0]=is_prime[1]=false;
      |                                 ^~~~~
main.c:12:33: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'