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

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
    int l,r,d;
    int count;
    int L[100];
    scanf("%d %d %d",&d,&d,&d);
    for(int i=0;i<r-l+1;i++){
        L[i]=r+i;
    }
    for(int j=0;i<L.length;i++){
        if(L[i]%d==0){
            count++;
        }   
    }
    printf("%d",&count);
    return (0);
}

Compiler output:
main.c: In function 'main':
main.c:13:17: error: 'i' undeclared (first use in this function)
   13 |     for(int j=0;i<L.length;i++){
      |                 ^
main.c:13:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:20: error: request for member 'length' in something not a structure or union
   13 |     for(int j=0;i<L.length;i++){
      |                    ^
Language: C

#include<cstdio>
int main(){
	int l,r,d;
	int s=0;
	scanf("%d%d%d",&l,&r,&d);
	for(int i=l;i<=r;i++){
		if(i%d==0) s=s+1;
		
	}
	printf("%d",s);
} 

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

#include<bits/stdc++.h>
int main()
{
  int d,l,r,count=0;
  cin>>l>>r>>d;
  for(int i=l;i<=r;i++)
  {
    if(i%d==0)
    {
      count++;
    }
  }
  cout<<count<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>l>>r>>d;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout<<count<<"\n";
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
	int L, R, d, answer;
	cin >> L;
	cin >> R;
	cin >> d;
	answer = 0;
		for (int L; L　<=　R; L++) {
		if (L % d = 0){
		anwer + 1
}
}
cout << answer <<endl;
}


Compiler output:
a.cc:10:29: error: extended character 　 is not valid in an identifier
   10 |                 for (int L; L　<=　R; L++) {
      |                             ^
a.cc:10:34: error: extended character 　 is not valid in an identifier
   10 |                 for (int L; L　<=　R; L++) {
      |                                  ^
a.cc: In function 'int main()':
a.cc:10:29: error: 'L\U00003000' was not declared in this scope
   10 |                 for (int L; L　<=　R; L++) {
      |                             ^~~
a.cc:10:34: error: '\U00003000R' was not declared in this scope
   10 |                 for (int L; L　<=　R; L++) {
      |                                  ^~~
a.cc:11:23: error: lvalue required as left operand of assignment
   11 |                 if (L % d = 0){
      |                     ~~^~~
a.cc:12:17: error: 'anwer' was not declared in this scope; did you mean 'answer'?
   12 |                 anwer + 1
      |                 ^~~~~
      |                 answer
Language: C++

        // header {{{
        #include <bits/stdc++.h>
        using namespace std;
         
        #define CPP_STR(x) CPP_STR_I(x)
        #define CPP_CAT(x,y) CPP_CAT_I(x,y)
        #define CPP_STR_I(args...) #args
        #define CPP_CAT_I(x,y) x ## y
         
        #define ASSERT(expr...) assert((expr))
         
        void solve() {
            int s, e, x;
            cin >> s;
            cin >> e;
            cin >> a;
            int res = 0;
            if (a == 1) res = e - s + 1;
            else res = e/a - s/a;
        	cout << res << "\n" << endl;
            // cout << ans << "\n";
        }
         
        signed main() {
            
            solve();
         
            return 0;
        }

Compiler output:
a.cc: In function 'void solve()':
a.cc:16:20: error: 'a' was not declared in this scope
   16 |             cin >> a;
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

 int main () {
   
   int l, r, d;
   cin >> l >> r >> d;
   
   int z;
   z=(r-l+1)%d;
   
   
   if (z==0) {
     cout << (r-l+1)/d << endl;
   }
   else if (d==1) {
     cout << r << endl;
   }
   esle {
     cout << (r-1+1)/d << endl;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:19:4: error: 'esle' was not declared in this scope
   19 |    esle {
      |    ^~~~
a.cc:21:3: error: expected '}' at end of input
   21 |  }
      |   ^
a.cc:4:14: note: to match this '{'
    4 |  int main () {
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 
  int l, r, d, num, ans;
  cin >> l >> r >> d;
  int a[];
  for(int i = 1; i < 101; i++){
     for(int j = 1; j < i; j++){
        a[i] = d**;
     }
     if(a[i] > r) break;
  }
  
  for(int i = l; i < r + 1; i++){
     for(int j = l; j < a.length; j++){
       if (a[j] == i) ans++;
     }
  }
  
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: storage size of 'a' isn't known
    8 |   int a[];
      |       ^
a.cc:11:19: error: expected primary-expression before ';' token
   11 |         a[i] = d**;
      |                   ^
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class scratch
{

	public static void main(String[] args)
	{
		FastReader reader = new FastReader();
		int l = reader.nextInt();
		int r = reader.nextInt();
		int d = reader.nextInt();
		int ans = (r/d) - (l/d);
		if(d == 1)
		{
			ans += 1;
		}

		System.out.println(ans);

	}
	static class FastReader
	{
		BufferedReader br;
		StringTokenizer st;

		public FastReader()
		{
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next()
		{
			while (st == null || !st.hasMoreElements())
			{
				try
				{
					st = new StringTokenizer(br.readLine());
				}
				catch (IOException e)
				{
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt()
		{
			return Integer.parseInt(next());
		}

		long nextLong()
		{
			return Long.parseLong(next());
		}

		double nextDouble()
		{
			return Double.parseDouble(next());
		}

		String nextLine()
		{
			String str = "";
			try
			{
				str = br.readLine();
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
			return str;
		}
	}
}



Compiler output:
Main.java:6: error: class scratch is public, should be declared in a file named scratch.java
public class scratch
       ^
1 error
Language: C++

// header {{{
#include <bits/stdc++.h>
using namespace std;

#define CPP_STR(x) CPP_STR_I(x)
#define CPP_CAT(x,y) CPP_CAT_I(x,y)
#define CPP_STR_I(args...) #args
#define CPP_CAT_I(x,y) x ## y

#define ASSERT(expr...) assert((expr))

void solve() {
    cin >> s;
    cin >> e;
    cin >> x;
    int z = e /x - s/x;
	cout << z << "\n" << endl;
    // cout << ans << "\n";
}

signed main() {
    
    solve();

    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:13:12: error: 's' was not declared in this scope
   13 |     cin >> s;
      |            ^
a.cc:14:12: error: 'e' was not declared in this scope
   14 |     cin >> e;
      |            ^
a.cc:15:12: error: 'x' was not declared in this scope
   15 |     cin >> x;
      |            ^
Language: C++

/*#include<iostream>
#include<algorithm>
#include<string>
#include<cmath>
#define ll long long
using namespace std;

int main(){
	int n,h,ans=0;
	cin>>n;
	while(n--){
		int b;
		cin>>b;
		if(b==1){
			cout<<"hard";
			return 0;
		}
	}
	cout<<"easy";
	return 0;
}*/


#include<iostream>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  int c =0 ;
  for(int i = a;i<=b;i++){
    if(i%c==0) c1++;
  }
  cout<<c1;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:7: error: redeclaration of 'int c'
   29 |   int c =0 ;
      |       ^
a.cc:27:11: note: 'int c' previously declared here
   27 |   int a,b,c;
      |           ^
a.cc:31:16: error: 'c1' was not declared in this scope; did you mean 'c'?
   31 |     if(i%c==0) c1++;
      |                ^~
      |                c
a.cc:33:9: error: 'c1' was not declared in this scope; did you mean 'c'?
   33 |   cout<<c1;
      |         ^~
      |         c
Language: C++

include <bits/stdc++.h>;
using namespace std;

int main(){
	int l,r,d;
	cin >> l >> r >> d;
  	int ans= (r/d-l/d);
  	cout << ans;
  	return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>;
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> l >> r >> d;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | include <bits/stdc++.h>;
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << ans;
      |         ^~~~
a.cc:8:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

include <bits/stdc++.h>
using namespace std;

int main(){
	int l,r,d;
	cin >> l >> r >> d;
  	int ans= (r/d-l/d);
  	cout << ans;
  
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> l >> r >> d;
      |         ^~~
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << ans;
      |         ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  int c =0 ;
  for(int i = a;i<=b;i++){
    if(c%i==0) c++;
  }
  cout<<c;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: redeclaration of 'int c'
    6 |   int c =0 ;
      |       ^
a.cc:4:11: note: 'int c' previously declared here
    4 |   int a,b,c;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output14.txt", "w", stdout);
#endif
	int l,r,d;
	cin>>l>>r>>d;
	long a[n+1],i,ans=0;
    for(i=l;i<=r;i++)
    {
    	if(i%d==0)
          ans++;
    }
    cout<<ans<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'n' was not declared in this scope
   12 |         long a[n+1],i,ans=0;
      |                ^
Language: C

#include<stdio.h>

int main() {
	int L, R, d, i, count = 0;
	scanf_s("%d,%d,%d", &L, & R, &d);

	for(i = L; i <= R; i++)
	{
		if(i % d == 0)
		{
			count++;
		}
	}

	printf("%d", count);
}


Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |         scanf_s("%d,%d,%d", &L, & R, &d);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  int L,R,d;
  int x;
  cin >> L >> R >> d;
  rep(i,R - L + 1) {
    if ((i + L)%d==0)
      x++;
    cout << kotae << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'kotae' was not declared in this scope
   12 |     cout << kotae << endl;
      |             ^~~~~
Language: Java

import java.io.*;
 
public class Main{
  public static void main(String[] args){
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        int l,r,d;
        int count=0;
        
        String str1=br.readLine();
        l=Integer.parseInt(str1);
        String str2=br.readLine();
        r=Integer.parseInt(str2);
        String str3=br.readLine();
        d=Integer.parseInt(str3);
       
    
      for(int i=l;i<r;i++){
        if(i%d==0)System.out.println(count);
         count++;
        
          }
  
  }
}

Compiler output:
Main.java:9: error: unreported exception IOException; must be caught or declared to be thrown
        String str1=br.readLine();
                               ^
Main.java:11: error: unreported exception IOException; must be caught or declared to be thrown
        String str2=br.readLine();
                               ^
Main.java:13: error: unreported exception IOException; must be caught or declared to be thrown
        String str3=br.readLine();
                               ^
3 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;

 int main () {
   
   int l, r, d;
   cin >> l >> r >> d;
   
   int z;
   z=(r-l+1)%d;
   
   
   if (z==0) ) {
     cout << (r-l+1)/d << endl;
   }
   else {
     cout << (r-l+1)/d << endl;
   }
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: expected primary-expression before ')' token
   13 |    if (z==0) ) {
      |              ^
Language: Java

import java.io.*;
 
public class Main{
  public static void main(String[] args){
        BufferedReader br=new BufferedReader(new INputStreamReader(System.in));
        int l,r,d;
        int count=0;
        
        String str1=br.readLine();
        l=Integer.parseInt(str1);
        String str2=br.readLine();
        r=Integer.parseInt(str2);
        String str3=br.readLine();
        d=Integer.parseInt(str3);
       
    
      for(int i=l;i<r;i++){
        if(i%d==0)System.out.println(count);
         count++;
        
          }
  
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
        BufferedReader br=new BufferedReader(new INputStreamReader(System.in));
                                                 ^
  symbol:   class INputStreamReader
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;

 int main () {
   
   int l, r, d;
   cin >> l >> r >> d;
   
   int z;
   z=(r-l+1)%d
   
   
   if (z==0) ) {
     cout << (r-l+1)/d << endl;
   }
   else {
     cout << (r-l+1)/d << endl;
   }
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected ';' before 'if'
   10 |    z=(r-l+1)%d
      |               ^
      |               ;
......
   13 |    if (z==0) ) {
      |    ~~          
a.cc:16:4: error: 'else' without a previous 'if'
   16 |    else {
      |    ^~~~
Language: Java

import java.io.*;
 
public class Main{
  public static void main(String[] args){
        BufferedReader br=new BufferedReader(new INputStreamReader(System.in));
        int l,r,d;
        int count=0;
        
        String str1=br.readLine();
        l=Integer.parseInt(str1);
        String str2=br.readLine();
        r=Integer.parseInt(str2);
        String str3=br.readLine();
        d=Integer.parseInt(str3);
       
    
      for(int i=l;i<r;i++){
        if(i%d==0)System.out.println(count);
         count++;
        else
          }
  
  }
}

Compiler output:
Main.java:21: error: illegal start of statement
          }
          ^
Main.java:20: error: 'else' without 'if'
        else
        ^
2 errors
Language: Java

import java.io.*;
 
public class Main{
  public static void main(String[] args){
        BufferedReader br=new BufferedReader(new INputStreamReader(System.in));
        int l,r,d;
        int count=0;
        
        String str1=br.readLine();
        l=Integer.parseInt(str1);
        String str2=br.readLine();
        r=Integer.parseInt(str2);
        String str3=br.readLine();
        d=Integer.parseInt(str3);
       
    
      for(int i=l;i<r;i++){
        if(i%d==0){System.out.println(count);
         count++;}
        else
          }
  
  }
}

Compiler output:
Main.java:21: error: illegal start of statement
          }
          ^
1 error
Language: C

int main(void){
  int L,R,d,n,i;
  n=0;
  scanf("%d %d %d",&L &R &d);
  if(L<0||L>R||R>100||d<0||d>100){
    return 0;
  }
  
  for(i=L;i<=R;i++){
    if(i%d==0){
      n++;
    }
  }
  printf("%d",n);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d %d %d",&L &R &d);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d %d %d",&L &R &d);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:23: error: invalid operands to binary & (have 'int *' and 'int')
    4 |   scanf("%d %d %d",&L &R &d);
      |                    ~~ ^
      |                    |
      |                    int *
main.c:14:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |   printf("%d",n);
      |   ^~~~~~
main.c:14:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main(){
  int L, R, d, count = 0;
  cin >> L >> R >> d;
  for (int i = L; i < R+1; i++){
    if (fmod(i,d) == 0){
      count += 1;
      \\cout << i << endl;
    }
  }
  cout << count << endl;
  return 0;
}

Compiler output:
a.cc:15:7: error: stray '\' in program
   15 |       \\cout << i << endl;
      |       ^
a.cc:15:8: error: stray '\' in program
   15 |       \\cout << i << endl;
      |        ^
Language: Java

import java.io.*;
 
public class Main{
  public static void main(String[] args){
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        int l,r,d;
        int count=0;
        
        String str1=br.readLine();
        l=Integer.parseInt(str1);
        String str2=br.readLine();
        r=Integer.parseInt(str2);
        String str3=br.readLine();
        d=Integer.parseInt(str3);
        
    
      for(int i=l;i<r;i++){
        if(l<i<r&&n%d==0)System.out.println(count);
         count++;
          }
  
  }
}

Compiler output:
Main.java:18: error: bad operand types for binary operator '<'
        if(l<i<r&&n%d==0)System.out.println(count);
              ^
  first type:  boolean
  second type: int
Main.java:18: error: cannot find symbol
        if(l<i<r&&n%d==0)System.out.println(count);
                  ^
  symbol:   variable n
  location: class Main
2 errors
Language: C

int main(void){
  int L,R,d,n,i;
  n=0;
  scanf("%d %d %d",&L &R &d);
  if(L<0||L>R||R>100||d<0||d>100){
    return 0;
  }
  
  for(i=L;i=<R;i++){
    if(i%d==0){
      n++;
    }
  }
  printf("%d",n);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d %d %d",&L &R &d);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d %d %d",&L &R &d);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:23: error: invalid operands to binary & (have 'int *' and 'int')
    4 |   scanf("%d %d %d",&L &R &d);
      |                    ~~ ^
      |                    |
      |                    int *
main.c:9:13: error: expected expression before '<' token
    9 |   for(i=L;i=<R;i++){
      |             ^
main.c:14:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |   printf("%d",n);
      |   ^~~~~~
main.c:14:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: Java

import java.io.*;
 
public class Main{
  public static void main(String[] args){
        BufferedReader br=new BufferedReader(new INputStreamReader(System.in));
        int l,r,d,n;
        int count=0;
        
        String str1=br.readLine();
        l=Integer.parseInt(str1);
        String str2=br.readLine();
        r=Integer.parseInt(str2);
        String str3=br.readLine();
        d=Integer.parseInt(str3);
        n=l;
    
      for(int i=l;i<r;i++){
        if(l<n<r&&n%d==0)System.out.println(count);
         count++;
          }
  
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
        BufferedReader br=new BufferedReader(new INputStreamReader(System.in));
                                                 ^
  symbol:   class INputStreamReader
  location: class Main
Main.java:18: error: bad operand types for binary operator '<'
        if(l<n<r&&n%d==0)System.out.println(count);
              ^
  first type:  boolean
  second type: int
2 errors
Language: C

int main(void){
  int L,R,d,n;
  n=0;
  scanf("%d %d %d",&L &R &d);
  if(L<0||L>R||R>100||d<0||d>100){
    return 0;
  }
  
  for(i=L;i=<R;i++){
    if(i%d==0){
      n++;
    }
  }
  printf("%d",n);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d %d %d",&L &R &d);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d %d %d",&L &R &d);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:23: error: invalid operands to binary & (have 'int *' and 'int')
    4 |   scanf("%d %d %d",&L &R &d);
      |                    ~~ ^
      |                    |
      |                    int *
main.c:9:7: error: 'i' undeclared (first use in this function)
    9 |   for(i=L;i=<R;i++){
      |       ^
main.c:9:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:13: error: expected expression before '<' token
    9 |   for(i=L;i=<R;i++){
      |             ^
main.c:14:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |   printf("%d",n);
      |   ^~~~~~
main.c:14:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: Java

import java.io.*;

public class Main{
  public static void main(String[] args){
        BufferredReader br=new BufferedReader(new INputStreamReader(System.in));
        int l,r,d,n;
        int count=0;
        
        String str1=br.readLine();
        l=Integer.parseInt(str1);
        String str2=br.readLine();
        r=Integer.parseInt(str2);
        String str3=br.readLine();
        d=Integer.parseInt(str3);
        n=l;
    
      for(int i=l;i<r;i++){
        if(l<n<r&&n%d==0)System.out.println(count);
         count++;
          }
  
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
        BufferredReader br=new BufferedReader(new INputStreamReader(System.in));
        ^
  symbol:   class BufferredReader
  location: class Main
Main.java:5: error: cannot find symbol
        BufferredReader br=new BufferedReader(new INputStreamReader(System.in));
                                                  ^
  symbol:   class INputStreamReader
  location: class Main
Main.java:18: error: bad operand types for binary operator '<'
        if(l<n<r&&n%d==0)System.out.println(count);
              ^
  first type:  boolean
  second type: int
3 errors
Language: C

int main(void){
  int L,R,d,n;
  n=0;
  scanf("%d %d %d",&L &R &d);
  if(L<0||L>R||R>100||d<0||d>100){
    return 0;
  }
  
  for(L;R;++){
    if(L%d==0){
      n++;
    }
  }
  printf("%d",n);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d %d %d",&L &R &d);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d %d %d",&L &R &d);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:23: error: invalid operands to binary & (have 'int *' and 'int')
    4 |   scanf("%d %d %d",&L &R &d);
      |                    ~~ ^
      |                    |
      |                    int *
main.c:9:13: error: expected expression before ')' token
    9 |   for(L;R;++){
      |             ^
main.c:14:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |   printf("%d",n);
      |   ^~~~~~
main.c:14:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include<iostream>
using namespace std;
int main(){

 long long l,r,d;
  cin>>l>>r>>d;
  long long res=(l/d)+(r/d);
  if(l%d==0)
    res=res+1;
  cout<<res
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before '}' token
   10 |   cout<<res
      |            ^
      |            ;
   11 | }
      | ~
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int l,r,d,c=0;
  cin>>l>>r>>d;
  for(i=l;i<=r;i++)
  {
    if(d%i==0) c++;
  }
cout<<c<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=l;i<=r;i++)
      |       ^
Language: C

int void{
  int L,R,d,n;
  n=0;
  scanf("%d %d %d",&L &R &d);
  if(L<0||L>R||R>100||d<0||d>100){
    return 0;
  }
  
  for(L;R;++){
    if(L%d==0){
      n++;
    }
  }
  printf("%d",n);
  
  return 0;
}

Compiler output:
main.c:1:5: error: two or more data types in declaration specifiers
    1 | int void{
      |     ^~~~
main.c:1:9: error: expected identifier or '(' before '{' token
    1 | int void{
      |         ^
Language: C++

import java.util.*;
public class Main{
  public static void main(String[] args){
  	Scanner sc=new Scanner(System.in);
    int L = sc.nextInt();
    int R = sc.nextInt();
    int d = sc.nextInt();
    
    int counter=0;
    for(int i=L;i<=R;i++){
      if(i%d==0) counter++;
    }
    System.out.print(counter);
  }
}

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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int l = sc.nextInt();
		int r = sc.nextInt();
		int d = sc.nextInt();
		int ans = 0;
		if(l%d==0) {
			ans++;
		}
		for(int i = l; i < r; i += d ) {
			ans++;
		}
		System.out.println(ans);
		sc.close();
	}
}

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

#include<iostream>
using namespace std;
int main()
{
	int l,r,d,c=0;
  cin>>l>>r>>d;
  for(i=l;i<=r;i++)
  {
    if(d%i==0) c++;
  }
cout<<c<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=l;i<=r;i++)
      |       ^
a.cc:11:15: error: expected '}' at end of input
   11 | cout<<c<<endl;
      |               ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C

#include<bits/stdc++.h>
int main()
{
  int l,r,d;
  scanf("%d%d%d",&l,&r,&d);
  int i,sum=0;
  for(i=l;i<=r;i++)
  if(i%d==0)sum++;
  printf("%d",sum); 
} 

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
 
public class test{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int num3 = sc.nextInt();
        
        int n = 0;
        
        for(int i = num1;i <= num2;i++){
        	if(i % num3 == 0){
            	n++;
            }
        }
        System.out.println(n);
	}
}

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

#include (stdio.h)
int main(void);
{
  	int L,R,d,i;
  	printf("0以上100以下の範囲と探したい倍数を入力してください\n");
 	scanf("%d,%d,%d",L,R,d);
  	for(i=L,i<=R,i++){
  	if(i%d==0)
  		printf("%d,",i);
    }
  	return 0;
}

Compiler output:
main.c:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include (stdio.h)
      |          ^
main.c:3:1: error: expected identifier or '(' before '{' token
    3 | {
      | ^
Language: C++

#iclude<bits/stdc++.h>
using namespace std;
int main(){
	int p,q,d;
  	cin>>p>>q>>d;
  	cout<<(q/d)-((p-1)/d)<<"\n";
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #iclude; did you mean #include?
    1 | #iclude<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin>>p>>q>>d;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #iclude<bits/stdc++.h>
a.cc:6:9: error: 'cout' was not declared in this scope
    6 |         cout<<(q/d)-((p-1)/d)<<"\n";
      |         ^~~~
a.cc:6:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int l, r, d;
  cin >> l >> r >> d;
  
  int ans = 0;
  for (int i = l; i <= r, i++) {
    if (i % d == 0) ans++;
  }
  cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: expected ';' before ')' token
    9 |   for (int i = l; i <= r, i++) {
      |                              ^
      |                              ;
Language: Java

import java.util.*;
 
public Class test{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int num3 = sc.nextInt();
        
        int n = 0;
        
        for(int i = num1;i <= num2;i++){
        	if(i % num3 == 0){
            	n++;
            }
        }
        System.out.println(n);
	}
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
public Class test{
       ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args){
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:19: error: class, interface, enum, or record expected
}
^
3 errors
Language: C

#include<bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long ll;

int main(){
	int l,r,d,ans=0;
	cin>>l>>r>>d;
	for(int i=l;i<=r; i++){
		if(i%d==0){
			ans++;
		}
	}
	cout<<ans<<endl;
}
	

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <math.h> 


using namespace std;



int main()
{
	int L,R,d;
	int count = 0;
	cin >> L >> R >> d;
	if(!d) {
		cout << 0;
		return 0:
	}
	while(L <= R && L % d != 0)
		L++;
	if(L < R)
		count++;
	while(L + d <= R) {
		count++;
		L += d;
	}
	cout <<  count;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: expected ';' before ':' token
   16 |                 return 0:
      |                         ^
      |                         ;
a.cc:16:25: error: expected primary-expression before ':' token
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int l,r,d;
  cin >> l >> r >> d;
  int cut = 0;

  while(d<=r){
    for(int i=l; i<=r, i++){
      if(i%d==0){
        cut++;
      }
    }
    d=d+d;
  }

  cout << cut << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: expected ';' before ')' token
   10 |     for(int i=l; i<=r, i++){
      |                           ^
      |                           ;
Language: Java

import java.util.*;
 
public Class test{
	public void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int num3 = sc.nextInt();
        
        int n = 0;
        
        for(int i = num1;i <= num2;i++){
        	if(i % num3 == 0){
            	n++;
            }
        }
        System.out.println(n);
	}
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
public Class test{
       ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
	public void main(String[] args){
	       ^
  (use --enable-preview to enable unnamed classes)
Main.java:19: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

#include<cstdio>

int main()
{
	int l, r, d;
	scanf("%d %d %d", &l, &r, &d);
	
	int ans = ceil(1.0 * (r - l) / d);
	
	if(l % d == 0 and r % d == 0) ans++;
	printf("%d\n", ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'ceil' was not declared in this scope
    8 |         int ans = ceil(1.0 * (r - l) / d);
      |                   ^~~~
Language: Java

import java.util.*;
public class Main{
  	public static void main(String[] args){
      Scanner sc =new Scanner(System.in);
     
      int L=sc.nextInt();
      int R=sc.nextInt();
      int d=sc.nextInt();
      
      int a=(L-1)/d;
      int b=R/d;
      int c=b-a

      System.out.println(c);
    }
}

Compiler output:
Main.java:12: error: ';' expected
      int c=b-a
               ^
1 error
Language: C++

#include<iostream>
int main(){

 long long l,r,d;
  cin>>l>>r>>d;
  long long res=(l/d)+(r/d);
  if(l%d==0)
    res=res+1;
  cout<<res
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>l>>r>>d;
      |   ^~~
      |   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:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout<<res
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(void)
{
  int L,R,d;
  int val=0;
  cin>>L>>R>>n;
  for(int i=L;i<=R;i++)
  {
    if(i%d==0)
    {
      val++;
    }
  }
  cout<<val;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'n' was not declared in this scope
    7 |   cin>>L>>R>>n;
      |              ^
Language: C++

#inclue<bits/stdc++.h>
using namespace std;
int main () {
  int L, R, d;
  cin >> L >> R >> d;
  int ans = 0;
  for (int i = 0; i < 10000; i ++) {
    int kj = d * i;
    if (L <= kj && kj <= R) ans ++;
  }
  cout << ans << endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> L >> R >> d;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclue<bits/stdc++.h>
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout << ans << endl;
      |   ^~~~
a.cc:11:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:18: error: 'endl' was not declared in this scope
   11 |   cout << ans << endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inclue<bits/stdc++.h>
Language: Java

import java.util.*;
 
public class test{
	public void main(String[] args){
		Scanner sc = new Scanner();
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int num3 = sc.nextInt();
        
        int n = 0;
        
        for(int i = num1;i <= num2;i++){
        	if(i % num3 == 0){
            	n++;
            }
        }
        System.out.println(n);
	}
}

Compiler output:
Main.java:3: error: class test is public, should be declared in a file named test.java
public class test{
       ^
Main.java:5: error: no suitable constructor found for Scanner(no arguments)
		Scanner sc = new Scanner();
		             ^
    constructor Scanner.Scanner(Readable,Pattern) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Readable) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,CharsetDecoder) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,Charset) is not applicable
      (actual and formal argument lists differ in length)
2 errors
Language: C++

#include<iostream>
using namespace std;
int main{
  int l,r,d;
  cin>>l>>r>>d;
  if((l%d==0) || (r%d==0))
    cout<<((r-l)/d) + 1;
  else
    cout<<(r-l)/d;
  
return 0;}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:3: error: expected primary-expression before 'int'
    4 |   int l,r,d;
      |   ^~~
a.cc:4:3: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin>>l>>r>>d;
      |   ^~~
a.cc:6:3: error: expected unqualified-id before 'if'
    6 |   if((l%d==0) || (r%d==0))
      |   ^~
a.cc:8:3: error: expected unqualified-id before 'else'
    8 |   else
      |   ^~~~
a.cc:11:1: error: expected unqualified-id before 'return'
   11 | return 0;}
      | ^~~~~~
a.cc:11:10: error: expected declaration before '}' token
   11 | return 0;}
      |          ^
Language: C++

#include <iostream>
#include<algorithm>
#include <bits/stdc++.h>
using namespace std;

int main() {
  int L, R, d;
  cin >> L >> R >> d;
  int ans = 0;
  for(int i=L;i<=R;i++){
    if(i%d == 0){
      ans++
    }
  }
  cout << ans << endl
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: expected ';' before '}' token
   12 |       ans++
      |            ^
      |            ;
   13 |     }
      |     ~       
a.cc:15:22: error: expected ';' before '}' token
   15 |   cout << ans << endl
      |                      ^
      |                      ;
   16 | }
      | ~
Language: Java

import java.util.*;

public class Main {

    public static void main(String args[]) n {


        Scanner scan = new Scanner(System.in);

        int l = scan.nextInt();
        int r = scan.nextInt();
        int d = scan.nextInt();

        int a = l / d;
        int b = r / d;
        
        System.out.println(b - a);
    }


}

Compiler output:
Main.java:5: error: ';' expected
    public static void main(String args[]) n {
                                          ^
1 error
Language: Java

import java.util.*

public class test{
	public void main(String[] args){
		Scanner sc = new Scanner();
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int num3 = sc.nextInt();
        
        int n = 0;
        
        for(int i = num1;i <= num2;i++){
        	if(i % num3 == 0){
            	n++;
            }
        }
        System.out.println(n);
	}
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int l, r, d;
  cin>>l>>r>>d;
  int f = l % d == 0 ? l / d : l / d + 1;
  int cnt = 0;
  while(f * d <= r)
  {
    cnt++;
    f++;
  }
  cout<<cnt;
  retrurn 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'retrurn' was not declared in this scope
   15 |   retrurn 0;
      |   ^~~~~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

int main(void)
{
  int L, R, d, ld, rd, ans;
  scanf("%d%d%d", &L, &R, &d);
  if (L%d=0)
  {
    ld = L / d;
    ld++;
  }else
  {
    ld = L / d;
  }
  
  
  rd = R / d;
  ans = rd - ld;
  printf("%d", ans);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: lvalue required as left operand of assignment
   10 |   if (L%d=0)
      |       ~^~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int d, l, r;
  cin >> l >> r >> d ;
  cout << r/d-l/d + (l%d == 0) << endl;
  return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
    8 |   return;
      |   ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main() {
	int l, r, d;
	cin >> l >> r >> d;
	int r = 0;
	for (int i = l; i <= r; ++i) {
		if (i % d == 0) {
			++r;
		}
	}
	cout << r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: redeclaration of 'int r'
    7 |         int r = 0;
      |             ^
a.cc:5:16: note: 'int r' previously declared here
    5 |         int l, r, d;
      |                ^
Language: Java

import java.util.Scanner;
 
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int L = scanner.nextInt();
        int R = scanner.nextInt();
        int d = scanner.nextInt();
 
        int ans = 0;
        for (int i = L; i < R; i++) {
            if(i%d==0) ans++;
        }
 
        System.out.println(ans);
 
    }
 
 
 
}
import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int L = scanner.nextInt();
        int R = scanner.nextInt();
        int d = scanner.nextInt();

        int ans = 0;
        for (int i = L; i < R; i++) {
            if(i%d==0) ans++;
        }

        System.out.println(ans);

    }



}
提出情報
提出日時

Compiler output:
Main.java:22: error: class, interface, enum, or record expected
import java.util.Scanner;
^
Main.java:43: error: class, interface, enum, or record expected
????
^
2 errors
Language: C++

#include<bits/stdc++.h>
using nmaespace std;
int main()
{
  int l,r,d,c=0;
  cin >> l >> r >> d;
  while(l <= r)
  {
    if(l%d == 0)
    {
      c++;
    }
    l++;
  }
  cout << c;
  return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nmaespace'
    2 | using nmaespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> l >> r >> d;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:15:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |   cout << c;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<bits/stdc++>

using namespace std;

int main()
{
  int L,R,d,i=1,count=0;
  cin>>L>>R>>d;
  
  while(i*d <= R){
    int mul = i*d;
    if(mul>= L && mul<=R){
    	
      count++;
    }
  }
  cout<<count;
      
}

Compiler output:
a.cc:1:9: fatal error: bits/stdc++: No such file or directory
    1 | #include<bits/stdc++>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
	ios_base::sync_with_stdio(false);
  	cin.tie(0);
  	cout.tie(0);
  
  	int l,r,d;
  	cin>>l>>r>>d;
  	int count=0;
  	for(int i=l;i<=r;++i)
    {
      if(i%d==0)
        count++;
    }
  	cout<<count<<"\n";

Compiler output:
a.cc: In function 'int main()':
a.cc:18:27: error: expected '}' at end of input
   18 |         cout<<count<<"\n";
      |                           ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main(){
  ll l,r,d;
  cin >> l >> r >> d;
  ll c = 0;
  for(ll i = l; i <= r; i++){
    if(i%d==0) c++;
  }
  cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'll' was not declared in this scope
    6 |   ll l,r,d;
      |   ^~
a.cc:7:10: error: 'l' was not declared in this scope
    7 |   cin >> l >> r >> d;
      |          ^
a.cc:7:15: error: 'r' was not declared in this scope
    7 |   cin >> l >> r >> d;
      |               ^
a.cc:7:20: error: 'd' was not declared in this scope
    7 |   cin >> l >> r >> d;
      |                    ^
a.cc:8:5: error: expected ';' before 'c'
    8 |   ll c = 0;
      |     ^~
      |     ;
a.cc:9:9: error: expected ';' before 'i'
    9 |   for(ll i = l; i <= r; i++){
      |         ^~
      |         ;
a.cc:9:17: error: 'i' was not declared in this scope
    9 |   for(ll i = l; i <= r; i++){
      |                 ^
a.cc:10:16: error: 'c' was not declared in this scope
   10 |     if(i%d==0) c++;
      |                ^
a.cc:12:11: error: 'c' was not declared in this scope
   12 |   cout << c << endl;
      |           ^