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

#include <stdio.h>

int getSum(int n);

int main(void){

  int n;
  int ret = 0;
  int max;

  while(1){

    max = 1;
    ret = scanf("%d", &n);
    if(ret == EOF){

      break;

    }

    max += getSum(n);

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

  } 
  
  return 0;
}

int getSum(int n){

  return (1+n)\2;

}

Compiler output:
main.c: In function 'getSum':
main.c:32:15: error: stray '\' in program
   32 |   return (1+n)\2;
      |               ^
main.c:32:15: error: expected ';' before numeric constant
   32 |   return (1+n)\2;
      |               ^~
      |               ;
Language: C

#include <stdio.h>

int main(void)
{
	int n;
	int a;
	
	while (scanf("%d", &n) != EOF){
		switch (n){
		  case 1, 2:
		  	a = n * 2;
			break;
		
		  case 3:
		  	a = n * 2 + 1;
			break;
		
		  default:
		    a = (n - (n / 2) + 1) * (n / 2 + 1);
			break;
		}
		
		printf("%d\n", a);
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:10:25: error: expected ':' or '...' before ',' token
   10 |                   case 1, 2:
      |                         ^
main.c:10:25: error: expected expression before ',' token
Language: C

#include <stdio.h>
int main(void)
{
  int n;
  int i;
  while(scanf("%d",&n)!=EOF){
    a=1;
    for(i=1;i<=n;i++)
      a+=i;
    printf("%d\n",a);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: 'a' undeclared (first use in this function)
    7 |     a=1;
      |     ^
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
int x;
while(scanf("%d",&x)!=EOF){
printf("%d\n",n*(n+1)/2);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:15: error: 'n' undeclared (first use in this function)
    5 | printf("%d\n",n*(n+1)/2);
      |               ^
main.c:5:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
int x;
while(scanf("%d",&x)!=EOF){
printf("%d\n",n*(n+1)/2+1);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:15: error: 'n' undeclared (first use in this function)
    5 | printf("%d\n",n*(n+1)/2+1);
      |               ^
main.c:5:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

int main(){
	int n,i,x;
	for(x=1;scanf("%d",&n)!=EOF;x=1){
		for(i=1;i<=n;i++)x+=i;
		printf("%d\n",x);
	}
	exit(0);
}

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

N,main(){while(~scanf("%d",&N))printf("%d\n",N*(N+1)/2+1);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | N,main(){while(~scanf("%d",&N))printf("%d\n",N*(N+1)/2+1);}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    1 | N,main(){while(~scanf("%d",&N))printf("%d\n",N*(N+1)/2+1);}
      |         ^
Language: C

main(n){for(;~scanf("%d", &n);)printf("%d
",n*(n+1)/2+1);exit(0);}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(n){for(;~scanf("%d", &n);)printf("%d
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(n){for(;~scanf("%d", &n);)printf("%d
      |               ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(n){for(;~scanf("%d", &n);)printf("%d
main.c:1:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(n){for(;~scanf("%d", &n);)printf("%d
      |               ^~~~~
main.c:1:15: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:32: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(n){for(;~scanf("%d", &n);)printf("%d
      |                                ^~~~~~
main.c:1:32: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:32: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:32: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:39: warning: missing terminating " character
    1 | main(n){for(;~scanf("%d", &n);)printf("%d
      |                                       ^
main.c:1:39: error: missing terminating " character
    1 | main(n){for(;~scanf("%d", &n);)printf("%d
      |                                       ^~~
main.c:2:1: warning: missing terminating " character
    2 | ",n*(n+1)/2+1);exit(0);}
      | ^
main.c:2:1: error: missing terminating " character
    2 | ",n*(n+1)/2+1);exit(0);}
      | ^~~~~~~~~~~~~~~~~~~~~~~~
main.c:2:1: error: expected expression at end of input
main.c:2:1: error: expected declaration or statement at end of input
Language: C

main(){
  int n;
  while(scanf("%d",&n)!=EOF){
    printf("%d\n",1+n*(n+1)/2);
  }
}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |   while(scanf("%d",&n)!=EOF){
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){
main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |   while(scanf("%d",&n)!=EOF){
      |         ^~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:25: error: 'EOF' undeclared (first use in this function)
    3 |   while(scanf("%d",&n)!=EOF){
      |                         ^~~
main.c:3:25: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:3:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    4 |     printf("%d\n",1+n*(n+1)/2);
      |     ^~~~~~
main.c:4:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:4:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
#define N 100

int main(void){
	int i,n;
	int line[N];
	int area,prearea;

	for(i=0;scanf("%d",&line[i])==1;i++){}
	n=i;
	for(i=0;i<n;i++){
		area=2;
		for(j=1;j<line[i];j++){
			prearea=area;
			area+=prearea;
		}
		printf("%d\n",area);
	}
}

Compiler output:
main.c: In function 'main':
main.c:13:21: error: 'j' undeclared (first use in this function)
   13 |                 for(j=1;j<line[i];j++){
      |                     ^
main.c:13:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#define N 100

int main(void){
	int i,n;
	int line[N];
	int area,prearea;

	for(i=0;scanf("%d",&line[i])==1;i++){}
	n=i;
	for(i=0;i<n;i++){
		area=2;
		for(j=1;j<line[i];j++){
			prearea=area;
			area+=prearea;
		}
		printf("%d\n",area);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:21: error: 'j' undeclared (first use in this function)
   13 |                 for(j=1;j<line[i];j++){
      |                     ^
main.c:13:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>main(){int x;while(scanf("%d",&x)!=EOF){printf("%d\n",(x*x+x+2)/2);}return 0;}

Compiler output:
main.c:1:19: warning: extra tokens at end of #include directive
    1 | #include <stdio.h>main(){int x;while(scanf("%d",&x)!=EOF){printf("%d\n",(x*x+x+2)/2);}return 0;}
      |                   ^~~~
/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 <iostream>

int main()
{
    int n;
    while(cin>>n) {
        n%2 ? printf("%d\n",n*2+1):printf("%d\n",n*2);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     while(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
      |                  ^~~
Language: C++

#include <cstdio>
#include <iostream>
 
int main()
{
    int n;
    while(cin>>n) {
        n%2 ? printf("%d\n",n*2+1):printf("%d\n",n*2);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |     while(cin>>n) {
      |           ^~~
      |           std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#incldue<stdio.h>
int main(){
int n;
while(scanf("%d",&n)!=EOF){
printf("%d",(n*(n-1))/2+1);
}
return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue<stdio.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:7: error: 'scanf' was not declared in this scope
    4 | while(scanf("%d",&n)!=EOF){
      |       ^~~~~
a.cc:4:23: error: 'EOF' was not declared in this scope
    4 | while(scanf("%d",&n)!=EOF){
      |                       ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #incldue<stdio.h>
a.cc:5:1: error: 'printf' was not declared in this scope
    5 | printf("%d",(n*(n-1))/2+1);
      | ^~~~~~
a.cc:5:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>
using namespace std;

int main(){

  int a[10001] ;
  a[1] = 2;
  for(int i=2;i<=10000;i++) a[i] = a[i-1] + i;

  int n
  while(cin >> n){
  cout << a[n] << endl;
  }
  
  return 0;
}


  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected initializer before 'while'
   11 |   while(cin >> n){
      |   ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int mina(){
 ll n;
 wilhe(cin>>n){
  cout<<(n*n+n+2)/2<<"\n";
 }
}

Compiler output:
a.cc: In function 'int mina()':
a.cc:6:2: error: 'wilhe' was not declared in this scope
    6 |  wilhe(cin>>n){
      |  ^~~~~
a.cc:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
    9 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int mina(){
 ll n;
 while(cin>>n){
  cout<<(n*n+n+2)/2<<"\n";
 }
}

Compiler output:
a.cc: In function 'int mina()':
a.cc:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
    9 | }
      | ^
/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<iostream>
using namespace std;

int main(){
    
    int n;
    int count = 2;
    while(){
        cin >> n;
        if(n == EOF) break;
    for(int i = 1;i<n;i++){
        
        count += i + 1; 
        if(n == 1) count = 2;
    }
    
    cout<< count <<endl;
    }

    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected primary-expression before ')' token
    8 |     while(){
      |           ^
Language: C++

int main(int argc,char *argv[]){
	int n,ans;
	while(std::cin >> n){
				ans = (n*(n+1))/2+1;
				std::cout << ans <<std::endl;
	}
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:3:20: error: 'cin' is not a member of 'std'
    3 |         while(std::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 | int main(int argc,char *argv[]){
a.cc:5:38: error: 'cout' is not a member of 'std'
    5 |                                 std::cout << ans <<std::endl;
      |                                      ^~~~
a.cc:5:38: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:5:57: error: 'endl' is not a member of 'std'
    5 |                                 std::cout << ans <<std::endl;
      |                                                         ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main(int argc,char *argv[]){
Language: C++

#include<iostream>
using namespace std;
int main(){
int x;
while(cin>>x){
ans=1;
for(int i=1;i<=x;i++){
ans+=i;
}
cout<<ans<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
    6 | ans=1;
      | ^~~
      | abs
Language: C++

 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 #include<deque>
 #include<functional>
 #include<utility>
 
 using namespace std;

 int main()
 {
    int n;
    while(cin>>n)
    {
      long long int sum;
      sum=n*(n+1)/2+1;             
    }
    cout<<sum<<endl;
   //while(1);
   return 0;
 }

 

Compiler output:
a.cc: In function 'int main()':
a.cc:29:11: error: 'sum' was not declared in this scope
   29 |     cout<<sum<<endl;
      |           ^~~
Language: C++

#include<iostream>int main(){int n;while(std::cin>>n)std::co\
ut<<(n*n+n+2)/2<<'\n';}

Compiler output:
a.cc:1:23: warning: extra tokens at end of #include directive
    1 | #include<iostream>int main(){int n;while(std::cin>>n)std::co\
      |                       ^~~~
a.cc:1:61: warning: backslash-newline at end of file
    1 | #include<iostream>int main(){int n;while(std::cin>>n)std::co\
a.cc:1:9: fatal error: iostream>in: No such file or directory
    1 | #include<iostream>int main(){int n;while(std::cin>>n)std::co\
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<vector>
using namespace std;

int main(){
  int x;vector<int> anss;
  while(cin>>x){
    anss.push_back(1+0.5*x(x+1));
  }
  for(int i=0;i<anss.size();i++){
    cout<<anss[i]<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: 'x' cannot be used as a function
    8 |     anss.push_back(1+0.5*x(x+1));
      |                          ~^~~~~
Language: C++

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

int main(){
   int n;
   int a = 1
   while(cin>>n){
      if(n <= 2*a){
         cout << 2*n << endl;
      }else if(n <= 4*a){
         cout << 2*n + a << endl;
      }else if(n <= 6*a){
         cout << 2*n + 2*a << endl;
      }else{
         cout << 2*n + 4*a << endl;

   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:4: error: expected ',' or ';' before 'while'
    7 |    while(cin>>n){
      |    ^~~~~
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
   int n;
   int a = 1;
   while(cin>>n){
      if(n <= 2*a){
         cout << 2*n << endl;
      }else if(n <= 4*a){
         cout << 2*n + a << endl;
      }else if(n <= 6*a){
         cout << 2*n + 2*a << endl;
      }else{
         cout << 2*n + 4*a << endl;
      }
   return 0;
}


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

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

int main(){
	int n, ans = 0;
	
	while(cin>>n){
		for(int i = 1; i <= n; i ++){
			if(i % 2) sum += 2;
			else sum +=3;
		}
		cout<< ans<<endl;
	}

	return 0;
}


//2 4 7 9 



Compiler output:
a.cc: In function 'int main()':
a.cc:9:35: error: 'sum' was not declared in this scope
    9 |                         if(i % 2) sum += 2;
      |                                   ^~~
a.cc:10:30: error: 'sum' was not declared in this scope
   10 |                         else sum +=3;
      |                              ^~~
Language: C++

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

int main(){
	int n, ans = 0;
	
	while(cin>>n){
		for(int i = 1; i <= n; i ++){
			if(i % 2) sum += 2;
			else sum +=3;
		}
		cout<< sum<<endl;
	}

	return 0;
}


//2 4 7 9 



Compiler output:
a.cc: In function 'int main()':
a.cc:9:35: error: 'sum' was not declared in this scope
    9 |                         if(i % 2) sum += 2;
      |                                   ^~~
a.cc:10:30: error: 'sum' was not declared in this scope
   10 |                         else sum +=3;
      |                              ^~~
a.cc:12:24: error: 'sum' was not declared in this scope
   12 |                 cout<< sum<<endl;
      |                        ^~~
Language: C++

#include<iostream>int main(){for(int n;std::cin>>n;)std::cout<<n*(n+1)/2+1<<std::endl;}


Compiler output:
a.cc:1:23: warning: extra tokens at end of #include directive
    1 | #include<iostream>int main(){for(int n;std::cin>>n;)std::cout<<n*(n+1)/2+1<<std::endl;}
      |                       ^~~~
a.cc:1:9: fatal error: iostream>in: No such file or directory
    1 | #include<iostream>int main(){for(int n;std::cin>>n;)std::cout<<n*(n+1)/2+1<<std::endl;}
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<cstdio>
main(n,s){for(;~scanf("%d",&n);printf("%d\n",1+(n+1)*n/2));}

Compiler output:
a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token
    2 | main(n,s){for(;~scanf("%d",&n);printf("%d\n",1+(n+1)*n/2));}
      |     ^
Language: C++

#include<iostream>
int main(){
  int n;
  while(cin>>n)
    std::cout<<n*(n+1)/2+1<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   while(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:5:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |     std::cout<<n*(n+1)/2+1<<endl;
      |                             ^~~~
      |                             std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

main(n){for(;~scanf("%d",&n);)printf("%d\n",(n+1)*n/2+1);}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(n){for(;~scanf("%d",&n);)printf("%d\n",(n+1)*n/2+1);}
      |     ^
Language: C++

main(N){while(~scanf("%d",&N))printf("%d\n",N*(N+1)/2+1);}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(N){while(~scanf("%d",&N))printf("%d\n",N*(N+1)/2+1);}
      |     ^
Language: C++

#include <iostream>
using namespace std;
int main() {
	int n;
	while(cin>>n) {
		int res=0;
		for (int i=0; i<n; i++) res += 2;
	}
	cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'res' was not declared in this scope
    9 |         cout << res << endl;
      |                 ^~~
Language: C++

main(n){for(;~scanf("%d",&n);)printf("%d\n",n*-~n/2+1);}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(n){for(;~scanf("%d",&n);)printf("%d\n",n*-~n/2+1);}
      |     ^
Language: C++

main(n){for(;~scanf("%d",&n);)printf("%d\n",1-n*~n/2);}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(n){for(;~scanf("%d",&n);)printf("%d\n",1-n*~n/2);}
      |     ^
Language: C++

#include<iostream>
using namespace std;
int ans(int a){
	if(a==1) return 2;
	return a+ans(a-1);
}
int main(){
	int n;
	while(){
		cout<<ans(n)<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected primary-expression before ')' token
    9 |         while(){
      |               ^
Language: C++

i,a;main(n){for(;i=~scanf("%d",&n);printf("%d\n",a))for(i=a=1;i<=n;)a+=i++;}

Compiler output:
a.cc:1:1: error: 'i' does not name a type
    1 | i,a;main(n){for(;i=~scanf("%d",&n);printf("%d\n",a))for(i=a=1;i<=n;)a+=i++;}
      | ^
a.cc:1:9: error: expected constructor, destructor, or type conversion before '(' token
    1 | i,a;main(n){for(;i=~scanf("%d",&n);printf("%d\n",a))for(i=a=1;i<=n;)a+=i++;}
      |         ^
Language: C++

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<windows.h>
using namespace std;
int main(){
	int n;
	while(scanf("%d",&n) != EOF){
		int sum = 1;
		for(int i = 1; i <= n; i++)
			sum += i;
		cout << sum << endl;
	}
	
	return 0;
}

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

import sys
N=10000+1
d=[0]*N
d[0]=1
for i in xrange(1,N):
    d[i]=d[i-1]+i
for line in sys.stdin.readlines():
    print d[int(line.strip())]

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iostream>
using namespace std;

int main()
{
 int x, m ,count;
 while(cin>>n)
 {
  if(n>2)
  {
    for(int i=0; i<n-2; i++)
     {
        m+=count;
        count++;
      }
     cout<<n*2+m<<endl;
    }
   else
   {
    cout<<n*2<<endl;
   }
   }
  return 0;
}

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

#include<iostream>
using namespace std;

int main()
{
 int n;
 while(cin>>n)
 {
  if(n>2)
  {
   int m=1, count=0;
    for(int i=0; i<n-2; i++)
     {
        m+=count;
        count++;
      }
     cout<<n*m+count<<endl;
    }
   else
   {
    cout<<n*m<<endl;
   }
   }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: 'm' was not declared in this scope
   21 |     cout<<n*m<<endl;
      |             ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
 int n;
 while(cin>>n)
 {
  if(n>2)
  {
   static_int m=1, count=0;
    for(int i=0; i<n-2; i++)
     {
        m+=count;
        count++;
      }
     cout<<n*m+count<<endl;
    }
   else
   {
    cout<<n*2<<endl;
   }
   }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:4: error: 'static_int' was not declared in this scope; did you mean 'static'?
   11 |    static_int m=1, count=0;
      |    ^~~~~~~~~~
      |    static
a.cc:14:9: error: 'm' was not declared in this scope
   14 |         m+=count;
      |         ^
a.cc:14:12: error: 'count' was not declared in this scope
   14 |         m+=count;
      |            ^~~~~
a.cc:17:14: error: 'm' was not declared in this scope
   17 |      cout<<n*m+count<<endl;
      |              ^
a.cc:17:16: error: 'count' was not declared in this scope
   17 |      cout<<n*m+count<<endl;
      |                ^~~~~
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOExcetion{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null){
String[] values=line.split(" ");
double xa=Double.parseDouble(values[0]);
double ya=Double.parseDouble(values[1]);
double xb=Double.parseDouble(values[2]);
double yb=Double.parseDouble(values[3]);
double xc=Double.parseDouble(values[4]);
double yc=Double.parseDouble(values[5]);
double xd=Double.parseDouble(values[6]);
double yd=Double.parseDouble(values[7]);
if(xa==xb){
if(yc==yd){
System.out.println("YES");
}
else{
System.out.println("NO");
}
continue;
}
if(xc==xd){
if(ya==yb){
System.out.println("YES");
}
else{
System.out.println("NO");
}
continue;
}
double mab=(ya-yb)/(xa-xb);
double mcd=(yc-yd)/(xc-xd);
System.out.println(mab*mcd==-1.0?"YES":"NO");
}
}
}

Compiler output:
Main.java:4: error: cannot find symbol
public static void main(String[] args) throws IOExcetion{
                                              ^
  symbol:   class IOExcetion
  location: class Main
1 error
Language: Java

import java.io.*;
????
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null){
String[] values=line.split(" ");
double xa=Double.parseDouble(values[0]);
double ya=Double.parseDouble(values[1]);
double xb=Double.parseDouble(values[2]);
double yb=Double.parseDouble(values[3]);
double xc=Double.parseDouble(values[4]);
double yc=Double.parseDouble(values[5]);
double xd=Double.parseDouble(values[6]);
double yd=Double.parseDouble(values[7]);
if(xa==xb&&yc==yd){
System.out.println("YES");
}
else if(xc==xd&&ya==yb){
System.out.println("YES");
}
double my=(ya-yb)*(yc-yd);
double mx=(xa-xb)*(xc-xd);
else if(mx==my*-1){
System.out.println("YES");
}
else{
System.out.println("NO");
}
}
}
}

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
????
^
Main.java:25: error: 'else' without 'if'
else if(mx==my*-1){
^
2 errors
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null){
String[] values=line.split(" ");
double ax=Double.parseDouble(values[0]);
double ay=Double.parseDouble(values[1]);
double bx=Double.parseDouble(values[2]);
double by=Double.parseDouble(values[3]);
double cx=Double.parseDouble(values[4]);
double cy=Double.parseDouble(values[5]);
double dx=Double.parseDouble(values[6]);
double dy=Double.parseDouble(values[7]);
if(ax==bx&&cy==dy){
System.out.println("YES")
}
else if(ay==by&&cx==dx){
System.out.println("YES")
}
else if((ay-by)*(cx-dx)==(ax-bx)*(cy-dy)){
System.out.println("YES");
}
else{
System.out.println("NO");
}
}
}
}

Compiler output:
Main.java:18: error: ';' expected
System.out.println("YES")
                         ^
Main.java:21: error: ';' expected
System.out.println("YES")
                         ^
2 errors
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null){
String[] values=line.split(" ");
double ax=Double.parseDouble(values[0]);
double ay=Double.parseDouble(values[1]);
double bx=Double.parseDouble(values[2]);
double by=Double.parseDouble(values[3]);
double cx=Double.parseDouble(values[4]);
double cy=Double.parseDouble(values[5]);
double dx=Double.parseDouble(values[6]);
double dy=Double.parseDouble(values[7]);
double det1=(ay-by)*(dx--cx);
double det2=(ax-bx)*(cy-dy);
if(ax==bx&&cy==dy){
System.out.println("YES");
}
else if(ay==by&&cx==dx){
System.out.println("YES");
}
else if(det1==det2&&det1!=0.0){
System.out.println("YES");
}
else{
System.out.println("NO");
}
}
}
}

Compiler output:
Main.java:17: error: ')' expected
double det1=(ay-by)*(dx--cx);
                         ^
Main.java:17: error: ';' expected
double det1=(ay-by)*(dx--cx);
                           ^
2 errors
Language: Java

#include<stdio.h>
int main(){
    double ax,ay,bx,by,cx,cy,dx,dy;
    double abx,aby,cdx,cdy;
    for(;scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&ax,&ay,&bx,&by,&cx,&cy,&dx,&dy)!=EOF;){
        abx=bx-ax;aby=by-ay;
        cdx=dx-cx;cdy=dy-cy;
        if(abx*cdx+aby*cdy==0)printf("YES\n");
        else printf("NO\n");
    }
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
        ^
Main.java:4: error: class, interface, enum, or record expected
    double abx,aby,cdx,cdy;
    ^
Main.java:5: error: class, interface, enum, or record expected
    for(;scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&ax,&ay,&bx,&by,&cx,&cy,&dx,&dy)!=EOF;){
    ^
Main.java:5: error: class, interface, enum, or record expected
    for(;scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&ax,&ay,&bx,&by,&cx,&cy,&dx,&dy)!=EOF;){
         ^
Main.java:5: error: class, interface, enum, or record expected
    for(;scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&ax,&ay,&bx,&by,&cx,&cy,&dx,&dy)!=EOF;){
                                                                                       ^
Main.java:6: error: class, interface, enum, or record expected
        abx=bx-ax;aby=by-ay;
                  ^
Main.java:7: error: class, interface, enum, or record expected
        cdx=dx-cx;cdy=dy-cy;
        ^
Main.java:7: error: class, interface, enum, or record expected
        cdx=dx-cx;cdy=dy-cy;
                  ^
Main.java:8: error: class, interface, enum, or record expected
        if(abx*cdx+aby*cdy==0)printf("YES\n");
        ^
Main.java:9: error: class, interface, enum, or record expected
        else printf("NO\n");
        ^
Main.java:10: error: class, interface, enum, or record expected
    }
    ^
Main.java:12: error: class, interface, enum, or record expected
}
^
13 errors
Language: Java

import java.util.Scanner;

//Orthogonal
public class AOJ0058 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			double[][] p = new double[4][2];
			for(int i=0;i<4;i++){
				p[i][0] = sc.nextDouble();
				p[i][1] = sc.nextDouble();
			}
			double vx1 = p[1][0]-p[0][0];
			double vy1 = p[1][1]-p[0][1];
			double vx2 = p[3][0]-p[2][0];
			double vy2 = p[3][1]-p[2][1];
			System.out.println((vx1*vx2+vy1*vy2)==0?"YES":"NO");
		}
	}
}

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

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

    double xA,yA,xB,yB,xC,yC,xD,yD;
    while(~scanf("%lf %lf %lf %lf %lf %lf %lf %lf",
        &xA,&yA,&xB,&yB,&xC,&yC,&xD,&yD)){
            if((xB-xA)*(xD-xC)+(yB-yA)*(yD-yC) == 0){
                cout << "YES" << endl;
            }else{
                cout << "NO" << endl;
            }
    }
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <cmath>
^
Main.java:3: error: illegal character: '#'
#include<cstdio>
^
Main.java:4: error: illegal character: '#'
#include <algorithm>
^
Main.java:14: error: not a statement
                cout << "YES" << endl;
                              ^
Main.java:16: error: not a statement
                cout << "NO" << endl;
                             ^
Main.java:8: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
Main.java:12: error: illegal start of expression
        &xA,&yA,&xB,&yB,&xC,&yC,&xD,&yD)){
        ^
Main.java:12: error: illegal start of expression
        &xA,&yA,&xB,&yB,&xC,&yC,&xD,&yD)){
            ^
Main.java:12: error: illegal start of expression
        &xA,&yA,&xB,&yB,&xC,&yC,&xD,&yD)){
                ^
Main.java:12: error: illegal start of expression
        &xA,&yA,&xB,&yB,&xC,&yC,&xD,&yD)){
                    ^
Main.java:12: error: illegal start of expression
        &xA,&yA,&xB,&yB,&xC,&yC,&xD,&yD)){
                        ^
Main.java:12: error: illegal start of expression
        &xA,&yA,&xB,&yB,&xC,&yC,&xD,&yD)){
                            ^
Main.java:12: error: illegal start of expression
        &xA,&yA,&xB,&yB,&xC,&yC,&xD,&yD)){
                                ^
Main.java:12: error: illegal start of expression
        &xA,&yA,&xB,&yB,&xC,&yC,&xD,&yD)){
                                    ^
15 errors
Language: Java

import java.util.Scanner;

public class Main{

	public static final double EPS = 1e-8;

	public static class P implements Comparable<P>{
		public double x;
		public double y;
		public P(double x, double y) {
			this.x = x;
			this.y = y;
		}
		//ÀWª¶ºÉ éÙÇ\[gñÉ¨¢ÄOÉé
		public int compareTo(P o) {
			if(equals(o))return 0;
			if(Math.abs(x-o.x)<EPS){
				return y-o.y<0?1:y-o.y>0?-1:0;
			}
			return x-o.x<0?1:x-o.x>0?-1:0;
		}
		public boolean equals(P o){
			return Math.abs(x-o.x)<EPS && Math.abs(y-o.y)<EPS;
		}
	}

	/**
	 * s->txNg
	 * @author y-koashi
	 *
	 */
	public static class Vec{
		public P s;
		public P t;
		public double dx;
		public double dy;
		public Vec(P s, P t) {
			this.s = s;
			this.t = t;
			dx = t.x-s.x;
			dy = t.y-s.y;
		}
		/**
		 * àÏ
		 */
		public double dotProduct(Vec o){
			return dx*o.dx + dy*o.dy;
		}
		/**
		 * OÏ
		 */
		public double crossProduct(Vec o){
			return dx*o.dy - dy*o.dx;
		}
		/**
		 * xNgoÆ¼ðµÄ¢é©
		 * ð_ðÁÄ¢éKvÍÈ¢
		 * @param o
		 * @return
		 */
		public boolean isOrthogonal(Vec o){
			return dotProduct(o)==0;
		}

		public static void main(String[] args) {
			Scanner sc = new Scanner(System.in);
			while(sc.hasNext()){
				P p1 = new P(sc.nextDouble(), sc.nextDouble());
				P p2 = new P(sc.nextDouble(), sc.nextDouble());
				P p3 = new P(sc.nextDouble(), sc.nextDouble());
				P p4 = new P(sc.nextDouble(), sc.nextDouble());
				//Vec v1 = new Vec(p1, p2);
				//Vec v2 = new Vec(p3, p4);
				if(v1==null||v2==null)System.out.println("WRONG");else
				System.out.println(v1.isOrthogonal(v2)?"YES":"NO");
			}
		}
	}
}

Compiler output:
Main.java:74: error: cannot find symbol
				if(v1==null||v2==null)System.out.println("WRONG");else
				   ^
  symbol:   variable v1
  location: class Vec
Main.java:74: error: cannot find symbol
				if(v1==null||v2==null)System.out.println("WRONG");else
				             ^
  symbol:   variable v2
  location: class Vec
Main.java:75: error: cannot find symbol
				System.out.println(v1.isOrthogonal(v2)?"YES":"NO");
				                                   ^
  symbol:   variable v2
  location: class Vec
Main.java:75: error: cannot find symbol
				System.out.println(v1.isOrthogonal(v2)?"YES":"NO");
				                   ^
  symbol:   variable v1
  location: class Vec
4 errors
Language: Java

import java.util.Scanner;

public class Orthogonal {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		double x[]=new double[4];
		double y[]=new double[4];
		double xab,yab,xcd,ycd,ns;
		int i;
		while(sc.hasNext()){
			for(i=0;i<4;i++){
				x[i]=sc.nextDouble();
				y[i]=sc.nextDouble();
			}
			xab=x[1]-x[0];
			yab=y[1]-y[0];
			xcd=x[3]-x[2];
			ycd=y[3]-y[2];
			ns=(xab*xcd)+(yab*ycd);
			if(ns==0){
				System.out.println("YES");
			}
			else{
				System.out.println("NO");
			}
		}//while
	}
}

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

public class Main {
	static Scanner in = new Scanner(System.in);

	public static void main(String[] args) {
		double x1, y1, x2, y2;
		while (in.hasNext()) {
			x1 = -in.nextDouble();
			y1 = -in.nextDouble();
			x1 += in.nextDouble();
			y1 += in.nextDouble();
			x2 = -in.nextDouble();
			y2 = -in.nextDouble();
			x2 += in.nextDouble();
			y2 += in.nextDouble();
			System.out.println((x1 * x2 + y1 * y2 == 0) ? "YES" : "NO");
		}
	}
}

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

import java.util.*;

class Main {
    public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	double ep = 0.0;
	while(s.hasNext()) {
	    double[] d = new double[8];
	    for(int i=0 ; i<8 ; i++)
		d[i] = s.nextDouble();
	    double a = (d[3]-d[1])*(d[7]-d[5]) + (d[2]-d[0])*(d[6]-d[4]);
	    String ans;
	    if(a == 0)
		ans = "YES";
	    else
		ans = "NO";
	    }
	    System.out.println(ans);
	}
    }
}

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

#include<stdio.h>

int main(void){

double a,b,c,d,e,f,g,h;
while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f,&g,&h) != EOF){
if(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f,&g,&h) = EOF){
break;
}
if(c-a==0&&h-f==0){
printf("YES\n");
}
else if(d-b==0&&g-e==0){
printf("YES\n");
}
else if(c-a==0&&g-e==0){
printf("NO\n");
}
else if(d-b==0&&h-f==0){
printf("NO\n");
}
else if((d-b)/(c-a) == -(h-f)/(g-e)){
printf("YES\n");
}
else{
printf("NO\n");
}
}
return 0;
}



Compiler output:
main.c: In function 'main':
main.c:7:69: error: lvalue required as left operand of assignment
    7 | if(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f,&g,&h) = EOF){
      |                                                                     ^
Language: C

#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include <vector>
#include <map>
#include<cstdlib>


using namespace std;

void Solution()
{
    double xA, yA;
    double xB, yB;
    double xC, yC;
    double xD, yD;
    
    while(cin>>xA>>yA>xB>>yB>>xC>>yC>>xD>>yD)
    {
        //algorithm
        double a,b,c,d;
        
        a = (yA-yB);
        b = (xA-xB);
        c = (yC-yD);
        d = (xC-xD);
        
        (a*c + b*d == 0) ? puts("YES") : puts("NO");
    }

}


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

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

#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include <vector>
#include <map>
#include<cstdlib>


using namespace std;

void Solution()
{
    double xA, yA;
    double xB, yB;
    double xC, yC;
    double xD, yD;
    
    while(cin>>xA>>yA>>xB>>yB>>xC>>yC>>xD>>yD)
    {
        //algorithm
        double a, b, c, d;
        
        a = (yA-yB);
        b = (xA-xB);
        c = (yC-yD);
        d = (xC-xD);
        
        if(a*c + b*d == 0)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }

}


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

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

#include<iostream>
#include<iomanip>
#include<vector>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>
#include<memory>
 
using namespace std;
 
class Vector{
public:
  double x;
  double y;
 
  Vector(){}
  Vector( double x, double y ) : x(x), y(y) {}
  Vector operator + ( const Vector v ) { return Vector( x + v.x, y + v.y ); }
  Vector operator - ( const Vector v ) { return Vector( x - v.x, y - v.y ); }
  Vector operator * ( const double k ) { return Vector( x * k, y * k ); }
  Vector operator / ( const double k ) { return Vector( x / k, y / k ); }
  bool operator < ( const Vector &v ) const { return x * x + y * y < v.x * v.x + v.y * v.y; }
  double abs() { return sqrt( norm() ); }
  double norm() { return x * x + y * y; }
  static double dot( Vector v1, Vector v2 ) { return v1.x * v2.x + v1.y * v2.y; }
  static double cross( Vector v1, Vector v2 ) { return v1.x * v2.y - v1.y * v2.x; }
};
 
int main(){
  const double eps = 1e-10;
 
  Vector a, b, c, d;
   
  while ( cin >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y >> d.x >> d.y ){
      if ( fabs( Vector::dot( b - a, d - c ) ) < eps )
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
   
  return 0;
}

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

#include<iostream>
#include<iomanip>
#include<vector>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>
#include<memory>
 
using namespace std;
 
class Vector
{
public:
  double x;
  double y;
 
  Vector(){}
  Vector( double x, double y ) : x(x), y(y) {}
 
  Vector operator + ( const Vector v ) { return Vector( x + v.x, y + v.y ); }
  Vector operator - ( const Vector v ) { return Vector( x - v.x, y - v.y ); }
  Vector operator * ( const double k ) { return Vector( x * k, y * k ); }
  Vector operator / ( const double k ) { return Vector( x / k, y / k ); }
  bool operator < ( const Vector &v ) const { return x * x + y * y < v.x * v.x + v.y * v.y; }
 
  double abs() { return sqrt( norm() ); }
  double norm() { return x * x + y * y; }
 
  static double dot( Vector v1, Vector v2 ) { return v1.x * v2.x + v1.y * v2.y; }
  static double cross( Vector v1, Vector v2 ) { return v1.x * v2.y - v1.y * v2.x; }
};
 
int main()
{
  const double eps = 1e-10;
 
  Vector a, b, c, d;
   
  while ( cin >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y >> d.x >> d.y )
    {
      if ( fabs( Vector::dot( b - a, d - c ) ) < eps )
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
   
  return 0;
}

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

#include<stdio.h>
int main(){
  double x0,x1,x2,x3,y0,y1,y2,y3;
  while(scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x0,&y0,&x1,&y1,&x2,&y2,&x3,&y3)!=-1){
    while((x1-x0)*(x3-x2)+(y1-y0)*(y3-y2)==0)
      puts("YES");{
    }else{
      puts("NO");
  }
}
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:6: error: 'else' without a previous 'if'
    7 |     }else{
      |      ^~~~
Language: C

#include <stdio.h>

typedef struct Point {
  double x, y;
  Point(double x = 0, double y = 0):x(x), y(y){}
  Point operator +(Point p) { return Point(x+p.x, y+p.y);}
  Point operator -(Point p) { return Point(x-p.x, y-p.y);}
  Point operator *(double t) { return Point(x*t, y*t);}
} Point;

typedef Point Vector;

int naiseki(Vector a, Vector b);

int isTyokko(Point a1, Point a2, Point b1, Point b2) {
  if(naiseki(Vector(a1.x-a2.x, a1.y-a2.y), Vector(b1.x-b2.x, b1.y-b2.y)) == 0) {
    return 1;
  } else {
    return 0;
  }
}

int naiseki(Vector a, Vector b) {
  return a.x*b.x + a.y*b.y;
}

int main() {
  Point a, b, c, d;
  while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &a.x, &a.y, &b.x, &b.y, &c.x, &c.y, &d.x, &d.y) != EOF) {
    if(isTyokko(a, b, c, d)) printf("YES\n");
    else printf("NO\n");
  }
}

Compiler output:
main.c:5:3: error: expected specifier-qualifier-list before 'Point'
    5 |   Point(double x = 0, double y = 0):x(x), y(y){}
      |   ^~~~~
main.c: In function 'isTyokko':
main.c:16:14: error: expected expression before 'Vector'
   16 |   if(naiseki(Vector(a1.x-a2.x, a1.y-a2.y), Vector(b1.x-b2.x, b1.y-b2.y)) == 0) {
      |              ^~~~~~
main.c:16:6: error: too few arguments to function 'naiseki'
   16 |   if(naiseki(Vector(a1.x-a2.x, a1.y-a2.y), Vector(b1.x-b2.x, b1.y-b2.y)) == 0) {
      |      ^~~~~~~
main.c:13:5: note: declared here
   13 | int naiseki(Vector a, Vector b);
      |     ^~~~~~~
Language: C

#include<iostream>
#include<cmath>
#include<complex>

#define EPS (1e-10)
#define EQ(a,b) (abs((a)-(b)) < EPS)

using namespace std;

typedef complex<double> P;

double dot(P,P);
int is_orthogonal(P,P,P,P);
 
int main(void){

  P a,b,c,d;

  while(~scanf("%lf %lf %lf %lf %lf %lf %lf %lf"
	       ,&a.real(),&a.imag(),&b.real(),&b.imag()
	       ,&c.real(),&c.imag(),&d.real(),&d.imag())){

    if(is_orthogonal(a,b,c,d))cout << "YES" << endl;
    else cout << "NO" << endl;
  }

  return 0;
}

double dot(P a,P b) {
  return (a.real() * b.real() + a.imag() * b.imag());
}

int is_orthogonal(P a1,P a2,P b1,P b2) {
  return EQ( dot(a1-a2, b1-b2), 0.0 );
}

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

#include <cstdio>

using namespace std;

int main(){
	double x1,x2,x3,x4,y1,y2,y3,y4,slope1,slope2;

	while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4) != EOF){
		if(x1 == x2){
			if(y3 == y4)printf("YES\n");
			else{
				printf("NO\n");
			}
		}else{ //x1 != x2
			if(x3 == x4){
				if(y1 == y2)printf("YES\n");
				else{
					printf("NO\n");
				}
			}else{
				slope1 = (double)((y2-y1)/(x2-x1));
				slope2 = (double)((y4-y3)/(x4-x3));
				if(fabs(slope1*slope2 + 1) < EPS){
					printf("YES\n");
				}else{
					printf("NO\n");
				}
			}
		}
	}

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:23:36: error: 'fabs' was not declared in this scope
   23 |                                 if(fabs(slope1*slope2 + 1) < EPS){
      |                                    ^~~~
a.cc:23:62: error: 'EPS' was not declared in this scope
   23 |                                 if(fabs(slope1*slope2 + 1) < EPS){
      |                                                              ^~~