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

#include<stdio.h>
signed main(){
  int,n
  scanf("%d",&n);
  printf("%d",1000-n);
  return(0);
}

Compiler output:
main.c: In function 'main':
main.c:3:6: error: expected identifier or '(' before ',' token
    3 |   int,n
      |      ^
main.c:5:20: error: 'n' undeclared (first use in this function)
    5 |   printf("%d",1000-n);
      |                    ^
main.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main()
{
  cin >> N;
  cout << (1000 - (N % 1000)) % 1000 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'N' was not declared in this scope
    6 |   cin >> N;
      |          ^
Language: C++

#include <bits/stdc++.h>

int main() {
  	int n;
 	cin >> n;
  	cout << n % 1000;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin >> n;
      |         ^~~
      |         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:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         cout << n % 1000;
      |         ^~~~
      |         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 <stdio.h>

int main(){
    int s,total;
   

    s = N/1000;
    if (N > s*1000){
        s+=1;
        total = s*1000 - N;
    }
    total = s*1000 - N;

    printf("%d\n",total);
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:7:9: error: 'N' undeclared (first use in this function)
    7 |     s = N/1000;
      |         ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

int main(int argc, char const *argv[])
{

    int N;
    scanf("%d", &N);

    cout<<ceil((double)N / 1000) * 1000 - N;

    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:5:5: error: 'scanf' was not declared in this scope
    5 |     scanf("%d", &N);
      |     ^~~~~
a.cc:7:5: error: 'cout' was not declared in this scope
    7 |     cout<<ceil((double)N / 1000) * 1000 - N;
      |     ^~~~
a.cc:7:11: error: 'ceil' was not declared in this scope
    7 |     cout<<ceil((double)N / 1000) * 1000 - N;
      |           ^~~~
Language: C++

int main(int argc, char const *argv[])
{

    int N;
    cin>>N;

    cout<<ceil((double)N / 1000) * 1000 - N;

    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>N;
      |     ^~~
a.cc:7:5: error: 'cout' was not declared in this scope
    7 |     cout<<ceil((double)N / 1000) * 1000 - N;
      |     ^~~~
a.cc:7:11: error: 'ceil' was not declared in this scope
    7 |     cout<<ceil((double)N / 1000) * 1000 - N;
      |           ^~~~
Language: Java

import java.util.Scanner;

public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    n %= 1000;
    if(n==0||n==1000) {
        System.out.println(0);
    }
    else{
        System.out.println(1000-n);
    }
}

Compiler output:
Main.java:3: 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)
1 error
Language: Java

import java.util.Scanner;

public class hello_world {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        n %= 1000;
        if(n==0||n==1000) {
            System.out.println(0);
        }
        else{
            System.out.println(1000-n);
        }
    }
}

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

#include <iostram>
using namespace std;
int main()
{
  int n;
  cin >> n;
  cout << ((n%1000)?1000-(n%1000):0);
  return 0;
}


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

#include<iostream>
using namespace std;
 
int changee(int n){
		int change;
		if(n%1000==0){change =0;}
		else{change = 1000 - (a%1000);}
		return change;
}
 
int main() {
	int n;
	cin>>n;
	int cha = changee(n);
	cout<<cha;
}


Compiler output:
a.cc: In function 'int changee(int)':
a.cc:7:39: error: 'a' was not declared in this scope
    7 |                 else{change = 1000 - (a%1000);}
      |                                       ^
Language: C++

#include<iostream>
using namespace std;

int changee(int n){
	if(n%1000==0){change =0;}
  	else{change = 1000 - (a%1000);}
 	return change;
}

int main() {
	int n;
  	cin>>n;
  	cha = changee(n);
  	cout<<cha;
}


Compiler output:
a.cc: In function 'int changee(int)':
a.cc:5:23: error: 'change' was not declared in this scope; did you mean 'changee'?
    5 |         if(n%1000==0){change =0;}
      |                       ^~~~~~
      |                       changee
a.cc:6:14: error: 'change' was not declared in this scope; did you mean 'changee'?
    6 |         else{change = 1000 - (a%1000);}
      |              ^~~~~~
      |              changee
a.cc:6:31: error: 'a' was not declared in this scope
    6 |         else{change = 1000 - (a%1000);}
      |                               ^
a.cc:7:16: error: 'change' was not declared in this scope; did you mean 'changee'?
    7 |         return change;
      |                ^~~~~~
      |                changee
a.cc: In function 'int main()':
a.cc:13:9: error: 'cha' was not declared in this scope; did you mean 'char'?
   13 |         cha = changee(n);
      |         ^~~
      |         char
Language: C

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

int main(){
    int N;
    cin >> N;
    cout << 1000 - N % (1000) <<endl;
}

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

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

int main(){
	int n;
	cin>>n;
	for(iny a=1000;;a+=1000){
		if(a==n){
			cout<<"0\n";
			break;
		}
		else if(a > n){
			cout<<a-n<<"\n";
			break;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'iny' was not declared in this scope; did you mean 'int'?
    7 |         for(iny a=1000;;a+=1000){
      |             ^~~
      |             int
a.cc:7:25: error: 'a' was not declared in this scope
    7 |         for(iny a=1000;;a+=1000){
      |                         ^
Language: C

#include<stdio.h>
int main()
{
    int n,s;
    scanf("%d",&n);
    if(n<1000)

    s= 1000-n;
    printf("%d\n",s);

    else if(n>1000 && n<2000)
    {
        s= 2000-n;
        printf("%d\n",s);
    }
    else if(n>2000 && n<3000)
    {
        s= 3000-n;
        printf("%d\n",s);
    }
    else if(n>3000 && n<4000)
    {
        s= 4000-n;
        printf("%d\n",s);
    }
    else if(n>4000 && n<5000)
    {
        s= 5000-n;
        printf("%d\n",s);
    }
    else if(n>5000 && n<6000)
    {
        s= 6000-n;
        printf("%d\n",s);
    }
    else if(n>6000 && n<7000)
    {
        s= 7000-n;
        printf("%d\n",s);
    }
    else if(n>7000 && n<8000)
    {
        s= 8000-n;
        printf("%d\n",s);
    }
    else if(n>8000 && n<9000)
    {
        s= 9000-n;
        printf("%d\n",s);
    }
    else if(n>9000 && n<10000)
    {
        s= 10000-n;
        printf("%d\n",s);
    }
    else
    {
        prinf("0\n");
    }
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:11:5: error: 'else' without a previous 'if'
   11 |     else if(n>1000 && n<2000)
      |     ^~~~
main.c:58:9: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   58 |         prinf("0\n");
      |         ^~~~~
      |         printf
Language: C

n=int(input())
print((1000-(n%1000)))

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n=int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: expected expression before 'int'
    1 | n=int(input())
      |   ^~~
Language: C

#include <stdio.h>

#define ll long long 

void solve(){
  ll n;
  cin >> n;
  printf("%lld\n", (1000-(n%1000))%1000);
}

int main(){
  solve();
  return 0;
}

Compiler output:
main.c: In function 'solve':
main.c:7:3: error: 'cin' undeclared (first use in this function)
    7 |   cin >> n;
      |   ^~~
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

#define ll long long
#define endl "\n"

void solve(){
  ll n;
  cin >> n;
  cout << (1000-(n%1000))%1000 << endl;
}

int main(){
  solve();%1000 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: expected primary-expression before '%' token
   14 |   solve();%1000 << endl;
      |           ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	int N;
	cin >> N;
	int ans;
	if(N%1000==0){
		cout<<0;
	}
  else{
	    cout<<1000 - N%1000;<<endl;	
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: expected primary-expression before '<<' token
   11 |             cout<<1000 - N%1000;<<endl;
      |                                 ^~
Language: C++

#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main() {
	int N;
	cin >> N;
	int ans;
	if(N%1000==0){
		cout<<0;
	}else{
	    cout<<1000 - N%1000;<<endl;	
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:33: error: expected primary-expression before '<<' token
   12 |             cout<<1000 - N%1000;<<endl;
      |                                 ^~
Language: Java

import java.util.Scanner;
import java.io.PrintWriter;

public class APayment {
    public void solve(int testNumber, Scanner in, PrintWriter out) {

        int n = in.nextInt();
        if(n%1000==0) {
            out.println("0");
        }
        else {
            int y = n%1000;
            out.println(1000-y);
        }
    }
}


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

#include<bits/stdc++.h>
using nameaspace std;
int main()
{
  int n;
  cin>>n;
  if(n%1000==0)
    cout<<0<<endl;
  else
  cout<<(n/1000 + 1)*1000 - n<<endl;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nameaspace'
    2 | using nameaspace 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>>n;
      |   ^~~
      |   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:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout<<0<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout<<0<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   cout<<(n/1000 + 1)*1000 - n<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |   cout<<(n/1000 + 1)*1000 - n<<endl;
      |                                ^~~~
      |                                std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include 〈stdio.h〉
 main (void)
 {
   int a;
   scanf("%d",a)
 if((a%1000)=0){
   printf("0");
 
 
  

Compiler output:
main.c:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include 〈stdio.h〉
      |          ^~
main.c:2:2: error: return type defaults to 'int' [-Wimplicit-int]
    2 |  main (void)
      |  ^~~~
main.c: In function 'main':
main.c:5:4: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |    scanf("%d",a)
      |    ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #include 〈stdio.h〉
main.c:5:4: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |    scanf("%d",a)
      |    ^~~~~
main.c:5:4: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:17: error: expected ';' before 'if'
    5 |    scanf("%d",a)
      |                 ^
      |                 ;
    6 |  if((a%1000)=0){
      |  ~~              
main.c:7:4: error: expected declaration or statement at end of input
    7 |    printf("0");
      |    ^~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(void)
{
    int N;

    cin >> N;

    cout << N % 1000 << \n;
}


Compiler output:
a.cc:12:25: error: stray '\' in program
   12 |     cout << N % 1000 << \n;
      |                         ^
a.cc: In function 'int main()':
a.cc:12:26: error: 'n' was not declared in this scope
   12 |     cout << N % 1000 << \n;
      |                          ^
Language: C

#include <iostream>

int main(void) {
    int n;
    std::cin >> n;
    std::cout << 1000 * (n / 1000 + 1) - n << std::endl;
    return 0;
}

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

#incclude <stdio.h>
int main()
{
int N,a,change;
  printf("Enter price N");
  scanf("%d",&N);
  for(a=1;N>1000;a++)
  {
  N=N-1000;
  }
  change=1000-N;
  printf("Change is %d",change);
  return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #incclude; did you mean #include?
    1 | #incclude <stdio.h>
      |  ^~~~~~~~
      |  include
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    5 |   printf("Enter price N");
      |   ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | #incclude <stdio.h>
main.c:5:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    5 |   printf("Enter price N");
      |   ^~~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%d",&N);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
Language: C++

#include <bits/stdc++.h>
using namespace std;
    signed main(){
        ios::sync_with_stdio(false);
        cin.tie(nullptr);
        auto n;
        cin>>n;
        if(n%1000==0){
            cout<<0<<endl;
            return 0;
        }
        cout<<1000-n%1000<<endl;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: declaration of 'auto n' has no initializer
    6 |         auto n;
      |         ^~~~
Language: C++

#include <stdafx.h>
#include <iostream>
using namespace std;
int main()
{
	int a;
	cin >> a;
	int a2;
	a2 = a % 1000;
	if (a2 == 0) {
		cout << "0" << endl;
	}
	else {
		cout << (1000 - a2) << endl;
	}
	return 0;
}



Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include <stdafx.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
	int a;
	cin >> a;
	int a2;
	a2 = a % 1000;
	if (a2 == 0) {
		cout << "0" << endl;
	}
	else {
		cout << (1000 - a2) << endl;
	}
	return 0;
}



Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

class Main{public static void main(String[] a){SYstem.out.println(1000-new java.util.Scanner(System.in).nextInt()%1000);}}

Compiler output:
Main.java:1: error: package SYstem does not exist
class Main{public static void main(String[] a){SYstem.out.println(1000-new java.util.Scanner(System.in).nextInt()%1000);}}
                                                     ^
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
    int N;
    cin >> N:
    cout << N % 1000 << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: found ':' in nested-name-specifier, expected '::'
    7 |     cin >> N:
      |             ^
      |             ::
a.cc:7:12: error: 'N' is not a class, namespace, or enumeration
    7 |     cin >> N:
      |            ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int pay, ret;
    cin >> pay;
    ret = 1000-static_cast<int>(pay%1000);
    if (ret == 1000) ret = 0;
    cout << reinterpret_cast << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: expected '<' before '<<' token
   11 |     cout << reinterpret_cast << endl;
      |                              ^~
a.cc:11:30: error: expected type-specifier before '<<' token
a.cc:11:30: error: expected '>' before '<<' token
a.cc:11:30: error: expected '(' before '<<' token
   11 |     cout << reinterpret_cast << endl;
      |                              ^~
      |                              (
a.cc:11:30: error: expected primary-expression before '<<' token
   11 |     cout << reinterpret_cast << endl;
      |                              ^~
a.cc:11:37: error: expected ')' before ';' token
   11 |     cout << reinterpret_cast << endl;
      |                                     ^
      |                                     )
Language: C++

/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <iostream>

using namespace std;

int main()
{
    int pay, ret;
    cin >> pay;
    for (int i = 0; i * 1000 < pay; i++) {
        ret = i;
    }
    cout << 1000 * i - pay << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:20: error: 'i' was not declared in this scope
   20 |     cout << 1000 * i - pay << endl;
      |                    ^
Language: C++

    #include<iostream>
    #include<stdio.h>
    #include<conio.h>
    int main() {
      int N ;
      cin>>N ;
      int res = N%1000 ;
      if(res>500) {
        cout<<1000-res ;
      }
      else {
        cout<<res ;
      }
      return 0 ;
    }

Compiler output:
a.cc:3:13: fatal error: conio.h: No such file or directory
    3 |     #include<conio.h>
      |             ^~~~~~~~~
compilation terminated.
Language: C++

    #include<iostream>
    int main() {
      int N ;
      cin>>N ;
      int res = N%1000 ;
      if(res>500) {
        cout<<1000-res ;
      }
      else {
        cout<<res ;
      }
      return 0 ;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:4:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |       cin>>N ;
      |       ^~~
      |       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:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         cout<<1000-res ;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         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.h>
int main() {
  int N ;
  cin>>N ;
  int res = N%1000 ;
  if(res>500) {
    cout<<1000-res ;
  }
  else {
    cout<<res ;
  }
  return 0 ;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  if(n>=1000){
    p=n/1000;
    cout<<(p+1)*1000-n<<"\n";
  }else if(n<1000){
    cout<<(1000-n)<<"\n"
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'p' was not declared in this scope
    7 |     p=n/1000;
      |     ^
a.cc:10:25: error: expected ';' before '}' token
   10 |     cout<<(1000-n)<<"\n"
      |                         ^
      |                         ;
   11 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main() {
    int N = 0;
    cin >> N;
    int pay = 0;
    int change = 0;

    if (N%1000 == 0)
    {
        pay = N;
        change = pay - N;
        cout << change << endl;
    }else
    {
        pay = N/1000*1000 + 1000;
        change = pay-N;
        cout << change << endl;1
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:33: error: expected ';' before '}' token
   21 |         cout << change << endl;1
      |                                 ^
      |                                 ;
   22 |     }
      |     ~
Language: C++

int N;
    cin >> N;
    if (N >= 1 && N <= 10000 && N % 1000 == 0) {
        cout << "0";
    } else {
        int res;
        res = 1000 - (N % 1000);
        cout << res;
    }
    return 0;

Compiler output:
a.cc:2:5: error: 'cin' does not name a type
    2 |     cin >> N;
      |     ^~~
a.cc:3:5: error: expected unqualified-id before 'if'
    3 |     if (N >= 1 && N <= 10000 && N % 1000 == 0) {
      |     ^~
a.cc:5:7: error: expected unqualified-id before 'else'
    5 |     } else {
      |       ^~~~
a.cc:10:5: error: expected unqualified-id before 'return'
   10 |     return 0;
      |     ^~~~~~
Language: C++

int main()
{
    int N;
    cin >> N;
    if (N >= 1 && N <= 10000 && N % 1000 == 0) {
        cout << "0";
    } else {
        int res;
        res = 1000 - (N % 1000);
        cout << res;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> N;
      |     ^~~
a.cc:6:9: error: 'cout' was not declared in this scope
    6 |         cout << "0";
      |         ^~~~
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout << res;
      |         ^~~~
Language: C++

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

int main() {
  int x;
  cin >> x;
  
  if(x%1000==0){
    cout << 0;
  }else{
    cout << (1000-x%1000);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:2: error: expected '}' at end of input
   12 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: Java

public static void main() {
  getChange(N);
}
public static int getChange(int N) {
  while (N > 1000) {
    N = N - 1000;
  }
  return N;
}


Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main() {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

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


int main() {
	int N;
	cin >> N;
	cout << (1000 -  N % 1000) *% 1000<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:37: error: expected primary-expression before '%' token
    9 |         cout << (1000 -  N % 1000) *% 1000<< endl;
      |                                     ^
Language: C++

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

int main(){
    float n;
    cin >> n;
    cout << 1000 - (n % 1000);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: invalid operands of types 'float' and 'int' to binary 'operator%'
    7 |     cout << 1000 - (n % 1000);
      |                     ~ ^ ~~~~
      |                     |   |
      |                     |   int
      |                     float
Language: Java

import java.util.Scanner;

public class Test0716 {

    public static void main(final String[] args) {
      Scanner scan = new Scanner(System.in);
      int inputStr = scan.nextInt();//ここでコンソールに入力したものを取得
      // System.out.println("Hello World!");
      int money = 0;
      int otsuri = 0;
      for(int i=1; i<=10; i++){
        money = 1000*i;
        if(money-inputStr >= 0){
           otsuri = money-inputStr;
           break;
        }
      }
      System.out.println(otsuri);
    }
  
}

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

#include <iostream>
using namespace std;

int main(){
  
  int n;
  int price;
  
  cin>>n;
  
  int price = 1000;
  int change = n%1000;
  
  if (change == 0){
    price = 0;
  }
  else{
  
  	cout<<price - change;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: redeclaration of 'int price'
   11 |   int price = 1000;
      |       ^~~~~
a.cc:7:7: note: 'int price' previously declared here
    7 |   int price;
      |       ^~~~~
Language: C++

inclube <iostream>
using namespace std;
int main (){
  int N;
  cin >> N;
  cout << (1000-N%1000) << endl;
}

Compiler output:
a.cc:1:1: error: 'inclube' does not name a type
    1 | inclube <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N;
      |   ^~~
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout << (1000-N%1000) << endl;
      |   ^~~~
a.cc:6:28: error: 'endl' was not declared in this scope
    6 |   cout << (1000-N%1000) << endl;
      |                            ^~~~
Language: C++

#inclube <iostream>
using namespace std;
int main (){
  int N;
  cin >>N;
  cout << (1000-N%1000)<<endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclube; did you mean #include?
    1 | #inclube <iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >>N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclube <iostream>
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout << (1000-N%1000)<<endl;
      |   ^~~~
a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:26: error: 'endl' was not declared in this scope
    6 |   cout << (1000-N%1000)<<endl;
      |                          ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inclube <iostream>
Language: C++

inclube <iostream>
using namespace std;
int main (){
  int N;
  cin >>N;
  cout << (1000-N%1000)<<endl;
}

Compiler output:
a.cc:1:1: error: 'inclube' does not name a type
    1 | inclube <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >>N;
      |   ^~~
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout << (1000-N%1000)<<endl;
      |   ^~~~
a.cc:6:26: error: 'endl' was not declared in this scope
    6 |   cout << (1000-N%1000)<<endl;
      |                          ^~~~
Language: Java


public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!

        Scanner sc = new Scanner (System.in);
        
        int a = sc.nextInt();
        

            System.out.println(a%1000);
   
        
    }
}

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

#include<bits/stdc++.h>
#define jizz ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
#define lowbit(x) x&-x
#define F first 
#define S second 
#define pb push_back
#define MP make_pair
#define all(x) x.begin(),x.end()
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int INF=1e9;
const int MAXN=1e6;
int n;
int main()
{
	cin >> n;
	if (N%1000)
	cout << 1000-n%1000 << "\n";
	else cout << 0 << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'N' was not declared in this scope
   18 |         if (N%1000)
      |             ^
Language: C++

#include<bits/stdc++.h>
#define jizz ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
#define lowbit(x) x&-x
#define F first 
#define S second 
#define pb push_back
#define MP make_pair
#define all(x) x.begin(),x.end()
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int INF=1e9;
const int MAXN=1e6;
int n;
int main()
{
	cin >> n;
	cout << n%1000 << "\n"
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:31: error: expected ';' before '}' token
   18 |         cout << n%1000 << "\n"
      |                               ^
      |                               ;
   19 | }
      | ~
Language: C

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

int main ()
{
   int n,k;
   cin>>n;
   k=(1000-(n%1000))%1000;
   cout<<k<<endl;
    return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  int Y=1000;
  cin>>N;
  for(Y-N<0){
    Y=Y+1000;
  }
  cout<<(Y-N)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected ';' before ')' token
    7 |   for(Y-N<0){
      |            ^
      |            ;
a.cc:11:1: error: expected primary-expression before '}' token
   11 | }
      | ^
a.cc:10:21: error: expected ')' before '}' token
   10 |   cout<<(Y-N)<<endl;
      |                     ^
      |                     )
   11 | }
      | ~                    
a.cc:7:6: note: to match this '('
    7 |   for(Y-N<0){
      |      ^
a.cc:11:1: error: expected primary-expression before '}' token
   11 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  cin >> n;
  if(n%1000 == 0){
    cout << 0 << endl;
  }
  else{
    cout << n%1000 << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    4 |   cin >> n;
      |          ^
      |          yn
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int N;
    cin>>N;
    cout<<(1000-N%1000)%1000<<endl
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:35: error: expected ';' before 'return'
    6 |     cout<<(1000-N%1000)%1000<<endl
      |                                   ^
      |                                   ;
    7 |     return 0;
      |     ~~~~~~
Language: C++

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

int keta(int n) {
    int res;
    for(int i = 0; i < 100; i++) {
        n = n / 10;

        if(n == 0) {
            res = i + 1;
            break;
        }
    }
    return res;
}

int main() {
    int n;
  cin>>n;
  if(n%1000!=0){

  cout<<1000-n%1000<<endl;
  }
  else {
  cout<<0<<endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:20:12: note: to match this '{'
   20 | int main() {
      |            ^
Language: C++

c#include<bits/stdc++.h>
#define ll long long int
#define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define mod 1000000007
using namespace std;

int main()
{
	 
   boost
   #ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int t=1;
// 	cin>>t;
	while(t--)
	{
	    ll n;
	    cin>>n;
	    if(n%1000)
	    cout<<((n/1000)+1)*1000 - n;
	    else 
	    cout<<"0";
	    cout<<endl;
	}
    return 0;
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | c#include<bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'c' does not name a type
    1 | c#include<bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:3:15: error: 'ios_base' has not been declared
    3 | #define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
      |               ^~~~~~~~
a.cc:10:4: note: in expansion of macro 'boost'
   10 |    boost
      |    ^~~~~
a.cc:3:48: error: 'cin' was not declared in this scope
    3 | #define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
      |                                                ^~~
a.cc:10:4: note: in expansion of macro 'boost'
   10 |    boost
      |    ^~~~~
a.cc:3:59: error: 'cout' was not declared in this scope
    3 | #define boost ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
      |                                                           ^~~~
a.cc:10:4: note: in expansion of macro 'boost'
   10 |    boost
      |    ^~~~~
a.cc:12:33: error: 'stdin' was not declared in this scope
   12 |         freopen("input.txt","r",stdin);
      |                                 ^~~~~
a.cc:1:1: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | c#include<bits/stdc++.h>
a.cc:12:9: error: 'freopen' was not declared in this scope
   12 |         freopen("input.txt","r",stdin);
      |         ^~~~~~~
a.cc:13:34: error: 'stdout' was not declared in this scope
   13 |         freopen("output.txt","w",stdout);
      |                                  ^~~~~~
a.cc:13:34: note: 'stdout' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:25:19: error: 'endl' was not declared in this scope
   25 |             cout<<endl;
      |                   ^~~~
Language: C

#include <stdio.h>
 
int main(void){
int N;
scanf("%d",&N);

  if(N%!000 == 0){
   int result = 0;
  }else{
   int result = 1000-(N%1000);
  }
    printf("%d\n", result);
}

Compiler output:
main.c: In function 'main':
main.c:12:20: error: 'result' undeclared (first use in this function)
   12 |     printf("%d\n", result);
      |                    ^~~~~~
main.c:12:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
 
int Main(void){
int N;
scanf("%d",&N);

int result = N%1000;

printf("%d\n", result);
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
void main(){
  int n,c;
  scanf("%d,&n);
  if(n%1000==0){
    c=0;
  }
  else{
    while(n%1000!=0){
      n++;
    }
    c=n;
  }
  printf("%d",c);
}

Compiler output:
main.c: In function 'main':
main.c:4:9: warning: missing terminating " character
    4 |   scanf("%d,&n);
      |         ^
main.c:4:9: error: missing terminating " character
    4 |   scanf("%d,&n);
      |         ^~~~~~~~
main.c:5:3: error: expected expression before 'if'
    5 |   if(n%1000==0){
      |   ^~
main.c:14:18: error: expected ';' before '}' token
   14 |   printf("%d",c);
      |                  ^
      |                  ;
   15 | }
      | ~
Language: Java

import java.util.*;

class Main
{
	public static void main(String args[]) throws Exception
	{
		Scanner in = new Scanner(System.in);
		int n=in.nextInt();
		System.out.println(ans%1000);
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
		System.out.println(ans%1000);
		                   ^
  symbol:   variable ans
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class test {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
					System.out.println(1000-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<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  if(n%1000==0) cout<<)<<endl;
  else cout<<1000-(n%1000)<<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: expected primary-expression before ')' token
    6 |   if(n%1000==0) cout<<)<<endl;
      |                       ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N
    cin >> N;
  cout << (1000 - N % 1000)%1000 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: expected initializer before 'cin'
    5 |     cin >> N;
      |     ^~~
a.cc:6:19: error: 'N' was not declared in this scope
    6 |   cout << (1000 - N % 1000)%1000 << endl;
      |                   ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N
    cin >> N;
  cout << N%1000 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: expected initializer before 'cin'
    5 |     cin >> N;
      |     ^~~
a.cc:6:11: error: 'N' was not declared in this scope
    6 |   cout << N%1000 << endl;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define ull unsigned long long
#define INF 987654321

int main() {
    ios_base :: sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int n;
    cin >> n;
    n %= 1000;
    cout << min(1000 - n);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: no matching function for call to 'min(int)'
   13 |     cout << min(1000 - n);
      |             ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   template argument deduction/substitution failed:
a.cc:13:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   13 |     cout << min(1000 - n);
      |             ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 1 provided
Language: C

#include<stdio.h>
int main()
{
int n,t,a;
scanf("%d",&n);
t=n%1000;
if(t!=0)
a=1000-t;
else
a=t;
printf("%d\n",a);
return 0;
}a

Compiler output:
main.c:13:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   13 | }a
      | ^
Language: Java

import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int number = sc.nextInt();
		if(number == 10000) {
			System.out.println(0);
			
		}
		int ans = number/1000;
		
		if(number%1000 == 0) {
			System.out.println(0);
		}
		else {
			ans = 1000-(number - ans*1000);
			System.out.println(ans);
		}
		
	}

}
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int number = sc.nextInt();
		if(number == 10000) {
			System.out.println(0);
			
		}
		int ans = number/1000;
		
		if(number%1000 == 0) {
			System.out.println(0);
		}
		else {
			ans = 1000-(number - ans*1000);
			System.out.println(ans);
		}
		
	}

}


Compiler output:
Main.java:25: error: class, interface, enum, or record expected
import java.util.Scanner;
^
1 error
Language: C++

#include<iostream>
using namespace std:
int main()
{
  	int N;
  	cin>>N;
   	cout<<(1000- N%10000)/10000;
}



Compiler output:
a.cc:2:20: error: expected ';' before ':' token
    2 | using namespace std:
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before ':' token
Language: C++

#include<iostream>
using namespace std:
int main()
{
  	int N;
  	cin>>N;
   	cout<<(1000- N%10000)%10000;
}



Compiler output:
a.cc:2:20: error: expected ';' before ':' token
    2 | using namespace std:
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before ':' token
Language: C++

#include <iostream.h>
using namespace std:
int main()
{
  	int N;
  	cin>>N;
   	cout<<(1000- N%10000)/10000;
}



Compiler output:
a.cc:1:10: fatal error: iostream.h: No such file or directory
    1 | #include <iostream.h>
      |          ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream.h>
using namespace std:
int main()
{
  	int N,c;
  	cin>>N;
   	cout<<(1000- N%10000)/10000;
}



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

#include<iostream>
int main()
{
  	int N,c;
  	cin>>N;
   	cout<<(1000- N%10000)/10000;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin>>N;
      |         ^~~
      |         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:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         cout<<(1000- N%10000)/10000;
      |         ^~~~
      |         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.h>
int main()
{
  	int N,c;
  	cin>>N;
   	cout<<(1000- N%10000)/10000;
}



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

#include<stdio.h>
void main()
{
  	int N,c;
  printf("price of product : ");
    scanf("%d",&N);
   c= (1000- N%10000)/10000;
  printf("%d",c);
}



Compiler output:
a.cc:2:1: error: '::main' must return 'int'
    2 | void main()
      | ^~~~
Language: C++

#include<stdio.h>
void main()
{
  	int N,c;
  printf("price of product : ");
    scanf("%d",&N);
   c= (1000- N%10000)/10000;
  printf("%d",&c);
}



Compiler output:
a.cc:2:1: error: '::main' must return 'int'
    2 | void main()
      | ^~~~
Language: C++

#include<stdio.h>
void main()
{
  	int N,c;
  printf("price of product : ");
    scanf("%d",&N);
  	if(N>10000)
    {
      	c=N-10000;
    }
  	else
    {
      	printf("change

Compiler output:
a.cc:13:16: warning: missing terminating " character
   13 |         printf("change
      |                ^
a.cc:13:16: error: missing terminating " character
   13 |         printf("change
      |                ^~~~~~~
a.cc:2:1: error: '::main' must return 'int'
    2 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:13:16: error: expected primary-expression at end of input
   13 |         printf("change
      |                ^
a.cc:13:16: error: expected '}' at end of input
a.cc:12:5: note: to match this '{'
   12 |     {
      |     ^
a.cc:13:16: error: expected '}' at end of input
   13 |         printf("change
      |                ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: Java

//package beg_173;
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = a%100;
        System.out.println(Math.min(b,1000-b)));
 
    }
}

Compiler output:
Main.java:8: error: ';' expected
        System.out.println(Math.min(b,1000-b)));
                                              ^
1 error
Language: C

#include<stdio.h>

int main(void)
{
  int N;
  scanf("%d",&N);
  while(N > 0)}
  N = N - 1000;
 }
  if(N < 0)
  printf("%d",N * -1);
  else
  printf("%d",N);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:15: error: expected expression before '}' token
    7 |   while(N > 0)}
      |               ^
main.c: At top level:
main.c:8:3: warning: data definition has no type or storage class
    8 |   N = N - 1000;
      |   ^
main.c:8:3: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c:8:7: error: initializer element is not constant
    8 |   N = N - 1000;
      |       ^
main.c:9:2: error: expected identifier or '(' before '}' token
    9 |  }
      |  ^
main.c:10:3: error: expected identifier or '(' before 'if'
   10 |   if(N < 0)
      |   ^~
main.c:12:3: error: expected identifier or '(' before 'else'
   12 |   else
      |   ^~~~
main.c:15:3: error: expected identifier or '(' before 'return'
   15 |   return 0;
      |   ^~~~~~
main.c:16:1: error: expected identifier or '(' before '}' token
   16 | }
      | ^