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

#include<stdio.h>

int main(void) {
	int n, m;
	scanf_s("%d", &n);
	if (n % 2 == 0) {
		m = (n / 2) *(n / 2);
	}
	else {
		m = (n + 1)*(n - 1) / 4;
	}
	printf("%d", m);
}

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", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
#using namespace std#

int main(){
  
  int n;
  cin >> n;
  
  cout << n/2;
  
  return 0;
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #using
    2 | #using namespace std#
      |  ^~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   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:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout << n/2;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: Java

import java.util.Scanner;

public class pair {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		double k = in.nextInt();
		
		double pair = Math.ceil(k / 2) * Math.ceil((k - 1) / 2);
		System.out.println((int)pair);

	}

}


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

Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Compiler output:
a.cc:1:1: error: 'Find' does not name a type
    1 | Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.
      | ^~~~
Language: Java

public class pair {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		double k = in.nextInt();
		
		double pair = Math.ceil(k / 2) * Math.ceil((k - 1) / 2);
		System.out.println((int)pair);

	}

}

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

int soler(int n) {
	int i;
	int num = 0;
	num = (n>>1)*(n-(n>>1));
	return num;
}

int main() {
	int n;

	scanf("%d", &n);

	printf("%d\n", soler(n));

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'scanf' was not declared in this scope
   11 |         scanf("%d", &n);
      |         ^~~~~
a.cc:13:9: error: 'printf' was not declared in this scope
   13 |         printf("%d\n", soler(n));
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int soler(int n) {
Language: C++

#include <stdio.h>
#include <stdio.h>

using namespace std;

int main() {
	int K;
	cin >> K;
	int odd,even;
	even = K / 2;
	if ((K % 2) == 0)odd = even;
	else odd = even + 1;
	
	int pair_num = odd * even;
	cout << pair_num << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> K;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | #include <stdio.h>
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout << pair_num << endl;
      |         ^~~~
a.cc:15:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:29: error: 'endl' was not declared in this scope
   15 |         cout << pair_num << endl;
      |                             ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <stdio.h>
  +++ |+#include <ostream>
    2 | #include <stdio.h>
Language: C++

#include <stdio.h>

int main(void){
	int max;
	int kosu;
	int i;
	
	scanf("%d",&max);
	if(max % 2 == 0){
		kosu = (max / 2) * (max / 2);
	}else{
		kosu = (max / 2 + 1) * (max / 2):
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:49: error: expected ';' before ':' token
   12 |                 kosu = (max / 2 + 1) * (max / 2):
      |                                                 ^
      |                                                 ;
Language: C

#include <stdio.h>
int main() {
    int K;
    scanf("%d", &K);
    printf("%d",(K/2)*(++K/2))
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:31: error: expected ';' before 'return'
    5 |     printf("%d",(K/2)*(++K/2))
      |                               ^
      |                               ;
    6 |     return 0;
      |     ~~~~~~
Language: C

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int k;
    cin >> k;
    
    int g = k/2;
    int f = (k+1)/2;
    cout << g*f << "\n";
}


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

#include<cstdio>
using namespace std;
int a;
int main()
{
	cin>>a;
	cout<<(a/2)*((a+1)/2)<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>a;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<cstdio>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:7:9: error: 'cout' was not declared in this scope
    7 |         cout<<(a/2)*((a+1)/2)<<endl;
      |         ^~~~
a.cc:7:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:32: error: 'endl' was not declared in this scope
    7 |         cout<<(a/2)*((a+1)/2)<<endl;
      |                                ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<cstdio>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include<iostream>

int main(){
    int k;
    std::cin>>k;

    std::cout<<n<<std::endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'n' was not declared in this scope
    7 |     std::cout<<n<<std::endl;
      |                ^
Language: Java

public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		int k = in.nextInt();
		
		int ne = k/2;
		int no = k-ne;
 
		System.out.println(ne*no);
}

Compiler output:
Main.java:1: 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: C++

#include <iostream>
using namespace std;

int main() {
  int k;
	cin >> k;
  	int a = k/2;
  int answer;
  if(isOdd(k)==true){
    answer=a*(a+1);
  }else{
  	answer = a*a;
  }
  cout << answer << endl;
}
bool isOdd(int input){
	int a = input /2;
  if(a*2==input){
  	return false;
  }else{
  	return true;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: 'isOdd' was not declared in this scope
    9 |   if(isOdd(k)==true){
      |      ^~~~~
Language: Java

public class pair {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		int k = in.nextInt();
		
		double pair = Math.ceil(k / 2) * Math.ceil((k - 1) / 2);
		System.out.println((int)pair);

	}

}

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

#include <iostream>
using namespace std;

int main() {
  int k;
	cin >> k;
  	int a = k/2;
  int answer;
  if(isOdd(k)){
    answer=a*(a+1);
  }else{
  	answer = a*a;
  }
  cout << answer << endl;
}
bool isOdd(int input){
	int a = input /2;
  if(a*2==input){
  	return false;
  }else{
  	return true;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: 'isOdd' was not declared in this scope
    9 |   if(isOdd(k)){
      |      ^~~~~
Language: Java

public class Main implements Runnable {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        new Thread(null, new Main(), "", 128 * 1024 * 1024).start();
    }

    public void run() {
        int k = sc.nextInt();
        int ans = 0;
        for (int i = 1; i <= k; i++) {
            ans += (k - i + 1) / 2;
            System.out.println(ans);
        }
        System.out.println(ans);
    }
}


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

#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  cin>>x;
  if(x%2==1)cout<<(x/2)*((x/2)+1)<<endl;
  else cout<<(x/2)*(x/2)
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: expected ';' before '}' token
    7 |   else cout<<(x/2)*(x/2)
      |                         ^
      |                         ;
    8 | }
      | ~
Language: C++

#include<iostream>
using namespace std;
#define FOR(i,n,F) for(int i = n;i < F;i++)

int N;


int main() {
	cin >> N;
	cout <<((N % 2 == 0 ? pow(N / 2, 2) : (N - 1) / 2 * (((N - 1) / 2) + 1))) << "\n";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: 'pow' was not declared in this scope
   10 |         cout <<((N % 2 == 0 ? pow(N / 2, 2) : (N - 1) / 2 * (((N - 1) / 2) + 1))) << "\n";
      |                               ^~~
Language: C

#include<stdio.h>

int main()
{
	int A,N;
	
	scanf("%d", &A);
	if (A % 2 = 1)
		N = A / 2 * (A / 2 + 1);
	if (A % 2 = 0)
		N = A / 2;


	printf("%d", N);
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:19: error: lvalue required as left operand of assignment
    8 |         if (A % 2 = 1)
      |                   ^
main.c:10:19: error: lvalue required as left operand of assignment
   10 |         if (A % 2 = 0)
      |                   ^
Language: C++

#include<iostream>
using namespace std;
#define FOR(i,n,F) for(int i = n;i < F;i++)
#define WriteLine(ans) (cout << ans << "\n")


int N;
//string N;

int main() {
	cin >> N;
	WriteLine((N % 2 == 0 ? pow(N / 2, 2) : (N - 1) / 2 * (((N - 1) / 2) + 1)));
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:33: error: 'pow' was not declared in this scope
   12 |         WriteLine((N % 2 == 0 ? pow(N / 2, 2) : (N - 1) / 2 * (((N - 1) / 2) + 1)));
      |                                 ^~~
a.cc:4:33: note: in definition of macro 'WriteLine'
    4 | #define WriteLine(ans) (cout << ans << "\n")
      |                                 ^~~
Language: C++

#include <algorithm>
#include <iostream>
#include <memory>
#include <vector>


void main() {
  int a, b, c, d, e;
  int m, n;
  int i, j, k;

    scanf("%d", &k);

    c=0;
    for(int i=1; i<=k; i+=2){
        for(int j=2; j<=k; j+=2){
            c++;
        }
    }
    printf("%d\n", c);


  return;
}

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

#include<iostream>
#include <stdlib.h>
#include <algorithm>
#include <string>
#include <math.h>
typedef long long int ll;
using namespace std;
int main(){
	int K;
	cin >> K;
	if(K%2==0){
		cout << K/2*K/2 << endl;
	}else{
		cout << K/2*(K/2+1) <<< endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:39: error: expected primary-expression before '<' token
   14 |                 cout << K/2*(K/2+1) <<< endl;
      |                                       ^
Language: C++

/* Bismillahirrahmanirrahim */
/* Author : Jehian Norman Saviero (@Reiva5) */
#include <bits/stdc++.h>

// MACROS SAMPAH
#define Jehian using
#define Norman namespace
#define Saviero std

Jehian Norman Saviero;

// MACROS TYPE
typedef long l;
typedef long long ll;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef double ld;
typedef pair<int,int> pi;
typedef pair<l,l> pl;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<l> vl;
typedef vector<ll> vll;

// MACROS FOR PRINT
#define nl printf("\n")
#define sp printf(" ")

// MACROS FOR ATTRIBUTE
#define fi first
#define se second

// MACROS FOR FUNCTION AND METHOD
#define eb emplace_back
#define mp make_pair
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define ALL(x) (x).begin(), (x).end()
#define ALLN(x,n) (x), (x)+(n)
#define CUBE(x) (SQR(x)*(x))
#define SET(x,y) for (int _qwe = sizeof(x)/sizeof(x[0]); _qwe; ) x[--_qwe] = (y)
#define SQR(x) ((x)*(x))
#define SSORT(x,sz) sort(ALLN(x,sz))
#define RESET(x) memset((x), 0, sizeof(x))
#define VSORT(x) sort(ALL(x))

// MACROS READ INPUT
#define sci(x) scanf("%d", &x)
#define scl(x) scanf("%ld", &x)
#define scll(x) scanf("%lld", &x)
#define scul(x) scl(x)
#define scull(x) scll(x)

int main() {
	scll(N);
	ll count = 0;
	for (ll i = 2; i <= N; i += 2) {
		for (ll j = 1; j <= N; j += 2) {
			++count;
		}
	}
	cout << count << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:14: error: 'N' was not declared in this scope
   57 |         scll(N);
      |              ^
a.cc:52:32: note: in definition of macro 'scll'
   52 | #define scll(x) scanf("%lld", &x)
      |                                ^
Language: C++

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

int main(){
 int k;
 if(k%2==0){
   cout<<k*k/4;
}
  else{
  int ans=k/2;
    ans=ans*(k/2+1);
    cout<<ans;
  }
  
  

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

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

int main() {
  int X1,X2,Y1,Y2;
  cin >> X1 >> Y1 >> X2 >> Y2;
  int one = X2-X1;
  int too = Y2-Y1;
  int X3 = X2-B;
  int Y3 = Y2+A;
  int X4 = X3-A;
  int Y4 = Y4-B;
  cout << X3 << " " << Y3 << " " << X4 << " " << Y4 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'B' was not declared in this scope
    9 |   int X3 = X2-B;
      |               ^
a.cc:10:15: error: 'A' was not declared in this scope
   10 |   int Y3 = Y2+A;
      |               ^
Language: C++

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

int main() {
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;

    int xv = x2-x1, yv = y2-y1;
    if (xv > 0 && yv == 0)
        int ans[] = {x1+xv, y1+xv, x1, y1+yv};
    else if (yv == 0)
        int ans[] = {x1+xv, y1+xv, x1, y1+yv};
    else if (yv > 0)
        int ans[] = {x1-yv, y1+xv, x1-yv, y1};
    else
        int ans[] = {x1-xv, y1+xv, x1-xv, y1};

    cout
        << ans[0] << " "
        << ans[1] << " "
        << ans[2] << " "
        << ans[3] << " " << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |         << ans[0] << " "
      |            ^~~
      |            abs
Language: C++

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

int main() {
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;

    int xv = x2-x1, yv = y2-y1;
    if (xv > 0 && yv == 0)
        int ans = {x1+xv, y1+xv, x1, y1+yv};
    else if (yv == 0)
        int ans = {x1+xv, y1+xv, x1, y1+yv};
    else if (yv > 0)
        int ans = {x1-yv, y1+xv, x1-yv, y1};
    else
        int ans = {x1-xv, y1+xv, x1-xv, y1};

    cout
        << ans[0] << " "
        << ans[1] << " "
        << ans[2] << " "
        << ans[3] << " " << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: scalar object 'ans' requires one element in initializer
   10 |         int ans = {x1+xv, y1+xv, x1, y1+yv};
      |             ^~~
a.cc:12:13: error: scalar object 'ans' requires one element in initializer
   12 |         int ans = {x1+xv, y1+xv, x1, y1+yv};
      |             ^~~
a.cc:14:13: error: scalar object 'ans' requires one element in initializer
   14 |         int ans = {x1-yv, y1+xv, x1-yv, y1};
      |             ^~~
a.cc:16:13: error: scalar object 'ans' requires one element in initializer
   16 |         int ans = {x1-xv, y1+xv, x1-xv, y1};
      |             ^~~
a.cc:19:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |         << ans[0] << " "
      |            ^~~
      |            abs
Language: C

#include<stdio.h>
#include<bits/stdc++.h>
using namespace std ;
int main()
{
    int a , b , c , d ;
    cin>>a>>b>>c>>d;
    int x = c-a , y = d-b ;
    cout<<c-y<<" "<<d+x<<" "<<a-y<<" "<<b+x;
}



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

#include<stdio.h>
using namespace std ;
int main()
{
int a , b , c , d ;
scanf (”%d%d%d%d ” , &a , &b , &c , &d ) ;
int x = c − a , y = d − b ;
printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
}

Compiler output:
a.cc:6:8: error: extended character ” is not valid in an identifier
    6 | scanf (”%d%d%d%d ” , &a , &b , &c , &d ) ;
      |        ^
a.cc:6:18: error: extended character ” is not valid in an identifier
    6 | scanf (”%d%d%d%d ” , &a , &b , &c , &d ) ;
      |                  ^
a.cc:7:11: error: extended character − is not valid in an identifier
    7 | int x = c − a , y = d − b ;
      |           ^
a.cc:7:23: error: extended character − is not valid in an identifier
    7 | int x = c − a , y = d − b ;
      |                       ^
a.cc:8:9: error: extended character ” is not valid in an identifier
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |         ^
a.cc:8:21: error: stray '\' in program
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |                     ^
a.cc:8:24: error: extended character ” is not valid in an identifier
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |                        ^
a.cc:8:30: error: extended character − is not valid in an identifier
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |                              ^
a.cc:8:46: error: extended character − is not valid in an identifier
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |                                              ^
a.cc: In function 'int main()':
a.cc:6:8: error: '\U0000201d' was not declared in this scope
    6 | scanf (”%d%d%d%d ” , &a , &b , &c , &d ) ;
      |        ^
a.cc:7:11: error: expected ',' or ';' before '\U00002212'
    7 | int x = c − a , y = d − b ;
      |           ^
a.cc:8:29: error: expected ')' before '\U00002212'
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |        ~                    ^~
      |                             )
a.cc:8:45: error: expected ')' before '\U00002212'
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |        ~                                    ^~
      |                                             )
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
#define repr(i,a,b) for (int i=a; i<b; i++)
#define rep(i,n) for (int i=0; i<  n; i++)
 
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
 
const long long INF = 1LL << 60;
#define PI 3.14159265359 
 
template<typename T>
void remove(std::vector<T>& vector, unsigned int index)
{
    vector.erase(vector.begin() + index);
}
 
int gcd(int a, int b){
    if(b == 0) return a;
    else return gcd(b, a%b);
}
 
long long lcm (int a, int b){
    return  (long long) a*b /gcd(a,b);
}

long long GCD(long long a, long long b) { return b ? GCD(b, a%b) : a; }


int main(){
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >>x2 >> y2;

    int dx = x2-x1;
    int dy = y2-y1;

    if(dx ==0){
        if(dy >0)cout << x1 - abs(dy) << " " << y2 << " " << x1 - abs(dx) << " " << y1 << endl;
        else cout << x1 + abs(dy) << " " << y2 << " " << x1 + abs(dy) << " " << y1 << endl;
    }
    else{
        if(dx > 0)cout << x2 <<" " << y2 + dx << " " << x1 <<  " " << y2 + dx <<endl;
        else cout << x2 << " " << y2 - dx << " " << x1 << " " << y2-dx  << endl;    
}



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

// lcmとか__builtin_popcountとかはg++ -std=c++17 default.cppみたいなかんじで

#include <bits/stdc++.h>
#define mod 1000000007
#define INF LLONG_MAX
#define ll long long
#define ln cout<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
using namespace std;
ll dx[4]={1,0,-1,0};
ll dy[4]={0,1,0,-1};

int main() {
    cin.tie(0);
   	ios::sync_with_stdio(false);

    ll a,b,c,d,m,n,maxi=0,f=0,mini=INF,sum=0;
    ll x,y;
  cin>>a>>b>>C>>d;
  x=c-a;y=d-b;
  cout<<c-y<<" "<<d+x<<" "<<a-y<<" "<<b+x<<endl;
    
    return 0;
}


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

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

# define ll long long 
# define VI vector<int>
# define VLL vector<ll>
# define PII pair<int,int> 
# define mp make_pair
# define pb push_back
# define PI acos(-1)
# define ld long double
# define FOR(i,a,b) for(int i = a ; i < b ; ++i)
# define RFOR(i,a,b) for(int i = a ; i >= b ; --i)
# define all(a) a.begin(),a.end() 
const int MxN = 10000 ; 
const int MOD = 1e9 + 7 ; 

/* VARIABLES */
VI adj[MxN] ; 
vector<bool> vis(MxN) ; 
/* END OF VARIABLES */

void dfs(int u) {
	vis[u] = true ; 
	for(int x : adj[u]) {
		if(!vis[x])
			dfs(x) ; 
	}
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL) ;  
	
	cin >> x1 >> y1 >> x2 >> y2 ; 
	int xdis = x2 - x1 ; 
	int ydis = y2 - y1 ; 
	cout << x2 - xdis << " " << y2 + ydis << " " << x1 + xdis << " " << y1 - ydis ; 

	return 0 ; 
}



Compiler output:
a.cc: In function 'int main()':
a.cc:36:16: error: 'x1' was not declared in this scope; did you mean 'y1'?
   36 |         cin >> x1 >> y1 >> x2 >> y2 ;
      |                ^~
      |                y1
a.cc:36:28: error: 'x2' was not declared in this scope
   36 |         cin >> x1 >> y1 >> x2 >> y2 ;
      |                            ^~
a.cc:36:34: error: 'y2' was not declared in this scope; did you mean 'yn'?
   36 |         cin >> x1 >> y1 >> x2 >> y2 ;
      |                                  ^~
      |                                  yn
a.cc:39:80: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   39 |         cout << x2 - xdis << " " << y2 + ydis << " " << x1 + xdis << " " << y1 - ydis ;
      |                                                                             ~~~^~~~~~
Language: C

/*  ex7_1
    Y_Aizaki  */

#include <stdio.h>

typedef struct point
{
    int x_elem; // x座標
    int y_elem; // y座標
}point;

point shift_point(point pointP, point pointQ){
    point pointR;

    pointR.x_elem = pointQ.x_elem + (-1)*(pointQ.y_elem - pointP.y_elem);
    // qとrのx座標の差の大きさは、pとqのy座標の差の大きさに等しい
    pointR.y_elem = pointQ.y_elem + (pointQ.x_elem - pointP.x_elem);
    // qとrのy座標の差の大きさは、pとqのx座標の差の大きさに等しい

    return pointR;
}

int main(void){
    point pointA,pointB,pointC,pointD;
    scanf("%d%d%d%d", &A.x_elem, &A.y_elem, &B.x_elem, &B.y_elem);

    pointC = shift_point(pointA, pointB);
    pointD = shift_point(pointB, pointC);

    printf("%d %d %d %d\n", pointC.x_elem, pointC.y_elem, pointD.x_elem, pointD.y_elem);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:24: error: 'A' undeclared (first use in this function)
   25 |     scanf("%d%d%d%d", &A.x_elem, &A.y_elem, &B.x_elem, &B.y_elem);
      |                        ^
main.c:25:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:46: error: 'B' undeclared (first use in this function)
   25 |     scanf("%d%d%d%d", &A.x_elem, &A.y_elem, &B.x_elem, &B.y_elem);
      |                                              ^
Language: C

//ex7_1
//TKC001

#include<stdio.h>
//pointの宣言
typedef struct point
{
    int x_elem;
    int y_elem;
}point;

//点Pをx軸方向にx_diff, y軸方向にy_diffだけずらす
point shift_point(point p, int x_diff, int y_diff){
    p.x_elem += x_diff;
    p.y_elem += y_diff;

    return p;
}


int main(void){
    point poi1, poi2, poi3, poi4;
    int x_diff, y_diff;
    //入力
    scanf("%d %d %d %d", &poi1.x_elem, &poi1.y_elem, &poi2.x_elem, &poi2.y_elem);

    //(x1, y1)と(x2, y2)はx軸方向にx_diff, y軸方向にy_diffだけずらせばそれぞれ(x3, y3), (x4, y4)になる。
    x_diff = poi1.y_elem-poi2.y_elem;
    y_diff = poi2.x_elem-poi1.x_elem;

    //ずらす処理
    poi3 = point_shift(poi2, x_diff, y_diff);
    poi4 = point_shift(poi1, x_diff, y_diff);

    //出力
    printf("%d %d %d %d", poi3.x_elem, poi3.y_elem, poi4.x_elem, poi4.y_elem);

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:32:12: error: implicit declaration of function 'point_shift' [-Wimplicit-function-declaration]
   32 |     poi3 = point_shift(poi2, x_diff, y_diff);
      |            ^~~~~~~~~~~
main.c:32:12: error: incompatible types when assigning to type 'point' from type 'int'
main.c:33:12: error: incompatible types when assigning to type 'point' from type 'int'
   33 |     poi4 = point_shift(poi1, x_diff, y_diff);
      |            ^~~~~~~~~~~
Language: C

/*  ex7-1
    toshiwaka */
 
//point構造体
typedef struct point{
    int x_elem;
    int y_elem;
}point;
 
//ref_pointからx,y軸方向にshift_x,shift_yだけそれぞれ移動
//移動後の点の座標をshifted_pointのメンバに代入
void shift_point(point *shifted_point, point ref_point, int shift_x, int shift_y);
 
#include <stdio.h>
 
int main(void) {
  //point:正方形の頂点
  //diff:2点間のx,y軸方向の距離
  point point[4], diff;
 
  //入力
  scanf("%d %d %d %d", &point[0].x_elem, &point[0].y_elem, &point[1].x_elem, &point[1].y_elem);
 
  //2点間のx,y軸方向の距離
  diff.x_elem = point[1].x_elem - point[0].x_elem;
  diff.y_elem = point[1].y_elem - point[0].y_elem;
 
  //残りの２点を算出
  shift_point(&point[2], &point[1], -1 * diff.y_elem, diff.x_elem);
  shift_point(&point[3], &point[0], -1 * diff.y_elem, diff.x_elem);
 
  //出力
  printf("%d %d %d %d\n", point[2].x_elem, point[2].y_elem, point[3].x_elem, point[3].y_elem);
 
  return 0;
}
 
 
//ref_pointからx,y軸方向にshift_x,shift_yだけそれぞれ移動
//移動後の点の座標をshifted_pointのメンバに代入
void shift_point(point *shifted_point, point ref_point, int shift_x, int shift_y){
  shifted_point->x_elem = ref_point.x_elem + shift_x;
  shifted_point->y_elem = ref_point.y_elem + shift_y;
};

Compiler output:
main.c: In function 'main':
main.c:29:26: error: incompatible type for argument 2 of 'shift_point'
   29 |   shift_point(&point[2], &point[1], -1 * diff.y_elem, diff.x_elem);
      |                          ^~~~~~~~~
      |                          |
      |                          point *
main.c:12:46: note: expected 'point' but argument is of type 'point *'
   12 | void shift_point(point *shifted_point, point ref_point, int shift_x, int shift_y);
      |                                        ~~~~~~^~~~~~~~~
main.c:30:26: error: incompatible type for argument 2 of 'shift_point'
   30 |   shift_point(&point[3], &point[0], -1 * diff.y_elem, diff.x_elem);
      |                          ^~~~~~~~~
      |                          |
      |                          point *
main.c:12:46: note: expected 'point' but argument is of type 'point *'
   12 | void shift_point(point *shifted_point, point ref_point, int shift_x, int shift_y);
      |                                        ~~~~~~^~~~~~~~~
Language: Java


class abc108_b {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int[] input = {0,0,0,0};
        for (int i = 0; i < input.length;i++) {
            input[i] = scan.nextInt(); // x_1,y_1,x_2,y_2
        }
        scan.close();
        int[][] position = {{0,0},{0,0},{0,0},{0,0}};
        position[0][0] = input[0];
        position[0][1] = input[1];
        position[1][0] = input[2];
        position[1][1] = input[3];
        position[2] = revpos(position[0],position[1]);
        position[3] = revpos(position[1], position[2]);
        if (position[0] == revpos(position[2], position[3])) {
            System.out.println("OK");
        }
        int[] output={0,0,0,0};
        output[0] = position[2][0];
        output[1] = position[2][1];
        output[2] = position[3][0];
        output[3] = position[3][1];
        for (int i : output) {
            System.out.println(i);
        }
    }
    public static int[] revpos(int[] p,int[] q) {//pos 1 pos 2
        int[] vec = {0,0};
        for (int i = 0; i < vec.length; i++) {
            vec[i] = p[i] - q[i];
        }
        int tmp = 0;
        tmp = vec[0];
        vec[0] = vec[1];
        vec[1] = -tmp;
        int[] newpos = {0,0};
        for (int i = 0; i < newpos.length; i++) {
            newpos[i] = q[i] + vec[i];
        }
        return newpos;
    }
}

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

public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int[] input = {0,0,0,0};
        for (int i = 0; i < input.length;i++) {
            input[i] = scan.nextInt(); // x_1,y_1,x_2,y_2
        }
        scan.close();
        int[][] position = {{0,0},{0,0},{0,0},{0,0}};
        position[0][0] = input[0];
        position[0][1] = input[1];
        position[1][0] = input[2];
        position[1][1] = input[3];
        position[2] = revpos(position[0],position[1]);
        position[3] = revpos(position[1], position[2]);
        if (position[0] == revpos(position[2], position[3])) {
            System.out.println("OK");
        }
        int[] output={0,0,0,0};
        output[0] = position[2][0];
        output[1] = position[2][1];
        output[2] = position[3][0];
        output[3] = position[3][1];
        for (int i : output) {
            System.out.println(i);
        }
    }
    public static int[] revpos(int[] p,int[] q) {//pos 1 pos 2
        int[] vec = {0,0};
        for (int i = 0; i < vec.length; i++) {
            vec[i] = p[i] - q[i];
        }
        int tmp = 0;
        tmp = vec[0];
        vec[0] = vec[1];
        vec[1] = -tmp;
        int[] newpos = {0,0};
        for (int i = 0; i < newpos.length; i++) {
            newpos[i] = q[i] + vec[i];
        }
        return newpos;
    }

Compiler output:
Main.java:1: 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

package abc108_b;
import java.util.Scanner;

public class abc108_b {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int[] input = {0,0,0,0};
        for (int i = 0; i < input.length;i++) {
            input[i] = scan.nextInt(); // x_1,y_1,x_2,y_2
        }
        scan.close();
        int[][] position = {{0,0},{0,0},{0,0},{0,0}};
        position[0][0] = input[0];
        position[0][1] = input[1];
        position[1][0] = input[2];
        position[1][1] = input[3];
        position[2] = revpos(position[0],position[1]);
        position[3] = revpos(position[1], position[2]);
        if (position[0] == revpos(position[2], position[3])) {
            System.out.println("OK");
        }
        int[] output={0,0,0,0};
        output[0] = position[2][0];
        output[1] = position[2][1];
        output[2] = position[3][0];
        output[3] = position[3][1];
        for (int i : output) {
            System.out.println(i);
        }
    }
    public static int[] revpos(int[] p,int[] q) {//pos 1 pos 2
        int[] vec = {0,0};
        for (int i = 0; i < vec.length; i++) {
            vec[i] = p[i] - q[i];
        }
        int tmp = 0;
        tmp = vec[0];
        vec[0] = vec[1];
        vec[1] = -tmp;
        int[] newpos = {0,0};
        for (int i = 0; i < newpos.length; i++) {
            newpos[i] = q[i] + vec[i];
        }
        return newpos;
    }
}

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

/*  ex7_1
    takafumi_ueki*/
#include <stdio.h>
#include <math.h>
//頂点を表す構造体
typedef struct{
    int x_elem;
    int y_elem;
}point;

point shift_point(point start_point,point end_point){
    point target_point;
    /*  あるベクトルの始点の座標が(x1,y1)、終点の座標が(x2,y2)である時、
        始点を中心に終点を反時計回りに90度回転させて移った点の座標(x3,y3)は
        x3 = x1 + y1 -y2
        y3 = x2 + y1 -y1 で表される。 */
    target.x_elem = start_point.x_elem + start_point.y_elem - end_point.y_elem;
    target.y_elem = start_point.y_elem + end_point.x_elem - start_point.x_elem;
    return target_point;
}

int main(void){
    point point1,point2,point3,point4;
    //値を受け取る
    scanf("%d %d %d %d",&point1.x_elem,&point1.y_elem,&point2.x_elem,&point2.y_elem);
    //座標(x4, y4)を求める
    point4 = shift_point(point1,point2);
    //座標(x3, y3)を求める
    point3 = shift_point(point4,point1);
    //結果を出力する
    printf("%d %d %d %d\n",point3.x_elem,point3.y_elem,point4.x_elem,point4.y_elem);
    return 0;
}

Compiler output:
main.c: In function 'shift_point':
main.c:17:5: error: 'target' undeclared (first use in this function)
   17 |     target.x_elem = start_point.x_elem + start_point.y_elem - end_point.y_elem;
      |     ^~~~~~
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<stdio.h>
using namespace std ;
int main ()
{
int a , b , c , d ;
scanf(”%d%d%d%d” , &a , &b , &c , &d ) ;
int x = c − a , y = d − b ;
printf(”%d %d %d %d\n” , c − y , d + x , a − y , b + x ) ;
}


Compiler output:
a.cc:6:7: error: extended character ” is not valid in an identifier
    6 | scanf(”%d%d%d%d” , &a , &b , &c , &d ) ;
      |       ^
a.cc:6:15: error: extended character ” is not valid in an identifier
    6 | scanf(”%d%d%d%d” , &a , &b , &c , &d ) ;
      |               ^
a.cc:7:11: error: extended character − is not valid in an identifier
    7 | int x = c − a , y = d − b ;
      |           ^
a.cc:7:23: error: extended character − is not valid in an identifier
    7 | int x = c − a , y = d − b ;
      |                       ^
a.cc:8:8: error: extended character ” is not valid in an identifier
    8 | printf(”%d %d %d %d\n” , c − y , d + x , a − y , b + x ) ;
      |        ^
a.cc:8:20: error: stray '\' in program
    8 | printf(”%d %d %d %d\n” , c − y , d + x , a − y , b + x ) ;
      |                    ^
a.cc:8:21: error: extended character ” is not valid in an identifier
    8 | printf(”%d %d %d %d\n” , c − y , d + x , a − y , b + x ) ;
      |                     ^
a.cc:8:28: error: extended character − is not valid in an identifier
    8 | printf(”%d %d %d %d\n” , c − y , d + x , a − y , b + x ) ;
      |                            ^
a.cc:8:44: error: extended character − is not valid in an identifier
    8 | printf(”%d %d %d %d\n” , c − y , d + x , a − y , b + x ) ;
      |                                            ^
a.cc: In function 'int main()':
a.cc:6:7: error: '\U0000201d' was not declared in this scope
    6 | scanf(”%d%d%d%d” , &a , &b , &c , &d ) ;
      |       ^
a.cc:6:15: error: 'd\U0000201d' was not declared in this scope
    6 | scanf(”%d%d%d%d” , &a , &b , &c , &d ) ;
      |               ^~
a.cc:7:11: error: expected ',' or ';' before '\U00002212'
    7 | int x = c − a , y = d − b ;
      |           ^
a.cc:8:27: error: expected ')' before '\U00002212'
    8 | printf(”%d %d %d %d\n” , c − y , d + x , a − y , b + x ) ;
      |       ~                   ^~
      |                           )
a.cc:8:43: error: expected ')' before '\U00002212'
    8 | printf(”%d %d %d %d\n” , c − y , d + x , a − y , b + x ) ;
      |       ~                                   ^~
      |                                           )
Language: C

/* ex 7_1
   アカウント名 */

#include <stdio.h>


typedef struct point{
    int x_elem;
    int y_elem;
}point;

point shift_point(point base, int x_diff, int y_diff){
    point new_point;
    new_point.x_elem = x_elem + x_diff;
    new_point.y_diff = y_elem + y_diff;
    return 
}

int main(void){
    int x_elem1, x_elem2, y_elem1, y_elem2;
    point vec1, vec2, vec3, vec4;
    scanf("%d %d %d %d", &x_elem1, &y_elem1, &x_elem2, &y_elem2);
    vec1.x_elem = x_elem1;
    vec1.y_elem = y_elem1;
    vec2.x_elem = x_elem2;
    vec2.y_elem = y_elem2;
    x_diff = vec2.x_elem - vec1.x_elem;
    y_diff = vec2.y_elem - vec1.y_elem;
    vec3 = shift_point(vec2, -y_diff, x_diff);
    vec4 = shift_point(vec1, -y_diff, x_diff);
    printf("%d %d %d %d\n", vec3.x_elem, vec3.y_elem, vec4.x_elem, vec4.y_elem);
    return 0;
}

Compiler output:
main.c: In function 'shift_point':
main.c:14:24: error: 'x_elem' undeclared (first use in this function)
   14 |     new_point.x_elem = x_elem + x_diff;
      |                        ^~~~~~
main.c:14:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:14: error: 'point' has no member named 'y_diff'
   15 |     new_point.y_diff = y_elem + y_diff;
      |              ^
main.c:15:24: error: 'y_elem' undeclared (first use in this function)
   15 |     new_point.y_diff = y_elem + y_diff;
      |                        ^~~~~~
main.c:17:1: error: expected expression before '}' token
   17 | }
      | ^
main.c: In function 'main':
main.c:27:5: error: 'x_diff' undeclared (first use in this function)
   27 |     x_diff = vec2.x_elem - vec1.x_elem;
      |     ^~~~~~
main.c:28:5: error: 'y_diff' undeclared (first use in this function)
   28 |     y_diff = vec2.y_elem - vec1.y_elem;
      |     ^~~~~~
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x1= sc.nextInt();
		int y1= sc.nextInt();
		int x2=sc.nextInt();
		int y2 =sc.nextInt();
		for (int x3=-200;x3<=200;x3++) {
			for (int y3=-200;y3<=200;y3++) {
				if ((y2-y1)*(y2-y1)+(x2-x1)*(x2-x1)==(y2-y3)*(y2-y3)+(x2-x3)*(x2-x3)) {
					if (x3==x1&&y3==y1) {
						continue;
					}
					int x = x3-x2;
					int y = y3-y2;
					int xa = x2-x1;
					int ya = y2-y1;
					if (x*xa+y*ya!=0) {
						continue;
					}
					if (x2>=x1&&y2>=y1&&x3<=x2&&y3>=y2) {
						int x4 = x3-(x2-x1);
						int y4 = y3-(y2-y1);
						System.out.println(x3+" "+y3+" " +x4+" "+y4);
						return ;
					} else if (x2>=x1&&y2<y1&&y2<y3&&x3>=x2) {
						int x4 = x3-(x2-x1);
						int y4 = y3-(y2-y1);
						System.out.println(x3+" "+y3+" " +x4+" "+y4);
						return ;
					} else if (x2<x1&&y2<y1&&y2>y3&&x3>=x2) {
						int x4 = x3-(x2-x1);
						int y4 = y3-(y2-y1);
						System.out.println(x3+" "+y3+" " +x4+" "+y4);
						return ;
					} else if (x2<x1&&y2>=y1&&y2>=y3&&x3<x2) {
						int x4 = x3-(x2-x1);
						int y4 = y3-(y2-y1);
						System.out.println(x3+" "+y3+" " +x4+" "+y4);
						return ;
					}
				}
			}
		}

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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x1= sc.nextInt();
		int y1= sc.nextInt();
		int x2=sc.nextInt();
		int y2 =sc.nextInt();
		for (int x3=-200;x3<=200;x3++) {
			for (int y3=-200;y3<=200;y3++) {
				if ((y2-y1)*(y2-y1)+(x2-x1)*(x2-x1)==(y2-y3)*(y2-y3)+(x2-x3)*(x2-x3)) {
					if (x3==x1&&y3==y1) {
						continue;
					}
					int x = x3-x2;
					int y = y3-y2;
					int xa = x2-x1;
					int ya = y2-y1;
					if (x*xa+y*ya!=0) {
						continue;
					}
					if (x2>=x1&&y2>=y1&&x3<=x2&&y3>=y2) {
						int x4 = x3-(x2-x1);
						int y4 = y3-(y2-y1);
						System.out.println(x3+" "+y3+" " +x4+" "+y4);
						return ;
					} else if (x2>=x1&&y2<y1&&y2<x3&&x3>=x2) {
						int x4 = x3-(x2-x1);
						int y4 = y3-(y2-y1);
						System.out.println(x3+" "+y3+" " +x4+" "+y4);
						return ;
					} else if (x2<x1&&y2<y1&&y2>x3&&x3>=x2) {
						int x4 = x3-(x2-x1);
						int y4 = y3-(y2-y1);
						System.out.println(x3+" "+y3+" " +x4+" "+y4);
						return ;
					} else if (x2<x1&&y2>=y1&&y2>=x3&&x3<x2) {
						int x4 = x3-(x2-x1);
						int y4 = y3-(y2-y1);
						System.out.println(x3+" "+y3+" " +x4+" "+y4);
						return ;
					}
				}
			}
		}
	}
}

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

#include <bits/stdc++.h>
using namespace std ;
int main ( )
{
int a , b , c , d ;
scanf (”%d%d%d%d ” , &a , &b , &c , &d ) ;
int x = c − a , y = d − b ;
printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
}


Compiler output:
a.cc:6:8: error: extended character ” is not valid in an identifier
    6 | scanf (”%d%d%d%d ” , &a , &b , &c , &d ) ;
      |        ^
a.cc:6:18: error: extended character ” is not valid in an identifier
    6 | scanf (”%d%d%d%d ” , &a , &b , &c , &d ) ;
      |                  ^
a.cc:7:11: error: extended character − is not valid in an identifier
    7 | int x = c − a , y = d − b ;
      |           ^
a.cc:7:23: error: extended character − is not valid in an identifier
    7 | int x = c − a , y = d − b ;
      |                       ^
a.cc:8:9: error: extended character ” is not valid in an identifier
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |         ^
a.cc:8:21: error: stray '\' in program
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |                     ^
a.cc:8:24: error: extended character ” is not valid in an identifier
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |                        ^
a.cc:8:30: error: extended character − is not valid in an identifier
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |                              ^
a.cc:8:46: error: extended character − is not valid in an identifier
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |                                              ^
a.cc: In function 'int main()':
a.cc:6:8: error: '\U0000201d' was not declared in this scope
    6 | scanf (”%d%d%d%d ” , &a , &b , &c , &d ) ;
      |        ^
a.cc:7:11: error: expected ',' or ';' before '\U00002212'
    7 | int x = c − a , y = d − b ;
      |           ^
a.cc:8:29: error: expected ')' before '\U00002212'
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |        ~                    ^~
      |                             )
a.cc:8:45: error: expected ')' before '\U00002212'
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |        ~                                    ^~
      |                                             )
Language: C++

#include<stdio.h>
using namespace std ;
int main ( )
{
int a , b , c , d ;
scanf (”%d%d%d%d ” , &a , &b , &c , &d ) ;
int x = c − a , y = d − b ;
printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
}


Compiler output:
a.cc:6:8: error: extended character ” is not valid in an identifier
    6 | scanf (”%d%d%d%d ” , &a , &b , &c , &d ) ;
      |        ^
a.cc:6:18: error: extended character ” is not valid in an identifier
    6 | scanf (”%d%d%d%d ” , &a , &b , &c , &d ) ;
      |                  ^
a.cc:7:11: error: extended character − is not valid in an identifier
    7 | int x = c − a , y = d − b ;
      |           ^
a.cc:7:23: error: extended character − is not valid in an identifier
    7 | int x = c − a , y = d − b ;
      |                       ^
a.cc:8:9: error: extended character ” is not valid in an identifier
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |         ^
a.cc:8:21: error: stray '\' in program
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |                     ^
a.cc:8:24: error: extended character ” is not valid in an identifier
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |                        ^
a.cc:8:30: error: extended character − is not valid in an identifier
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |                              ^
a.cc:8:46: error: extended character − is not valid in an identifier
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |                                              ^
a.cc: In function 'int main()':
a.cc:6:8: error: '\U0000201d' was not declared in this scope
    6 | scanf (”%d%d%d%d ” , &a , &b , &c , &d ) ;
      |        ^
a.cc:7:11: error: expected ',' or ';' before '\U00002212'
    7 | int x = c − a , y = d − b ;
      |           ^
a.cc:8:29: error: expected ')' before '\U00002212'
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |        ~                    ^~
      |                             )
a.cc:8:45: error: expected ')' before '\U00002212'
    8 | printf (”%d %d %d %d\n ” , c − y , d + x , a − y , b + x ) ;
      |        ~                                    ^~
      |                                             )
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
typedef struct {
  int x;
  int y;
} PT;
int main()
{
  PT pt[4];
  cin >> pt[0].x >> pt[0].y >> pt[1].x >> pt[1].y;
  if (pt[0].x==pt[1].x) {
    int edge_len = abs(pt[0].y-pt[1].y);
    pt[2].y = pt[1].y;
    pt[3].y = pt[0].y;
    if (pt[1].y > pt[0].y) {
      pt[2].x = pt[1].x - edge_len;
      pt[3].x = pt[0].x - edge_len;
    } else {
      pt[2].x = pt[1].x + edge_len;
      pt[3].x = pt[0].x + edge_len;
    }
  } else {
    int edge_len = abs(pt[0].x-pt[1].x);
    pt[2].x = pt[1].x;
    pt[3].x = pt[0].x;
    if (pt[1].x > pt[0].x) {
      pt[2].y = pt[1].y + edge_len;
      pt[3].y = pt[0].y + edge_len;
    } else {
      pt[2].y = pt[1].y - edge_len;
      pt[3].y = pt[0].y - edge_len;
    }
  }
  cout << pt[2].x << pt[2].y << pt[3].x << pt[3].y << ebdl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:55: error: 'ebdl' was not declared in this scope
   35 |   cout << pt[2].x << pt[2].y << pt[3].x << pt[3].y << ebdl;
      |                                                       ^~~~