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

#include <stdio.h>
#include <math.h>
int main(){
	int i=0,j;
	double x[20],y[20],s=0;
    //値の読み込み
    
    while(scanf("%lf,%lf\n",&x[i],&y[i]) !=EOF) {
    		//scanf("%lf%lf",&x[i],&y[i]);
    		i++;
    	}
    	j=i
    	for(i=1;i<j;i++){
    		s+=(x[i]*y[i+1]-x[i+1]*y[i]);
    	}
        s+=(x[i]*y[0]-x[0]*y[i]);)
    	printf("%0.6lf\n",fabs(s)/2.0);
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:12: error: expected ';' before 'for'
   12 |         j=i
      |            ^
      |            ;
   13 |         for(i=1;i<j;i++){
      |         ~~~ 
main.c:16:34: error: expected statement before ')' token
   16 |         s+=(x[i]*y[0]-x[0]*y[i]);)
      |                                  ^
Language: C

#include <stdio.h>
#include <math.h>
int main(){
	int i=0,j;
	double x[20],y[20],s=0;
    //値の読み込み
    
    while(scanf("%lf,%lf\n",&x[i],&y[i]) !=EOF) {
    		//scanf("%lf%lf",&x[i],&y[i]);
    		i++;
    	}
    	j=i
    	for(i=1;i<j;i++){
    		s+=(x[i]*y[i+1]-x[i+1]*y[i]);
    	}
        s+=(x[i]*y[0]-x[0]*y[i]);
    	printf("%0.6lf\n",fabs(s)/2.0);
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:12: error: expected ';' before 'for'
   12 |         j=i
      |            ^
      |            ;
   13 |         for(i=1;i<j;i++){
      |         ~~~
Language: C

#include <bits/stdc++.h>
using namespace std;
int n, x[128], y[128];

double cpx(int p, int q, int i)
{
        if(y[p] < y[q]) swap(p,q);
        double a = y[p]-i, b = i-y[q];
        return (b*x[p]+a*x[q])/(a+b);
}

int solve()
{
        int ans = 0, li = *min_element(y,y+n), ri = *max_element(y,y+n);
        for (int i = li; i < ri; i++) {
                vector<pair<double,double>> xs;
                for (int j = 0; j < n; j++) {
                        int nj = (j+1)%n;
                        if(y[j] == y[nj] or i < min(y[j], y[nj]) or i+1 > max(y[j], y[nj])) continue;
                        double x1 = cpx(j,nj,i), x2 = cpx(j,nj,i+1);
                        if(x1 > x2) swap(x1, x2);
                        xs.push_back(make_pair(x1,x2));
                }
                sort(begin(xs),end(xs));
                int xr = -2048;
                for (int j = 0; j < (int)xs.size()-1; j+=2) {
                        int l = max(int(floor(xs[j].first)), xr), r = ceil(xs[j+1].second);
                        ans += r-l;
                        xr = r;
                }
        }
        return ans;
}

bool input()
{
        scanf("%d", &n);
        for (int i = 0; i < n; i++) scanf("%d %d", x+i, y+i);
        return n;
}

int main()
{
        while(input()) printf("%d\n", solve());
        return 0;
}


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

#include <stdio.h> #include <math.h> double area3(double x1, double y1, double x2, double y2, double x3, double y3) { double a, b, c, z; a = sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)); b = sqrt((x1-x3)*(x1-x3) + (y1-y3)*(y1-y3)); c = sqrt((x2-x3)*(x2-x3) + (y2-y3)*(y2-y3)); z = (a+b+c)/2.0; return sqrt(z*(z-a)*(z-b)*(z-c)); } int main() { double x0, y0, x1, y1, x2, y2; double s=0.0; scanf("%lf,%lf", &x0, &y0); scanf("%lf,%lf", &x1, &y1); while (scanf("%lf,%lf", &x2,&y2)==2) { s+=area3(x0, y0, x1, y1, x2, y2); x1=x2; y1=y2; } printf("%.6lf\n", s); return 0; }


Compiler output:
main.c:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> #include <math.h> double area3(double x1, double y1, double x2, double y2, double x3, double y3) { double a, b, c, z; a = sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)); b = sqrt((x1-x3)*(x1-x3) + (y1-y3)*(y1-y3)); c = sqrt((x2-x3)*(x2-x3) + (y2-y3)*(y2-y3)); z = (a+b+c)/2.0; return sqrt(z*(z-a)*(z-b)*(z-c)); } int main() { double x0, y0, x1, y1, x2, y2; double s=0.0; scanf("%lf,%lf", &x0, &y0); scanf("%lf,%lf", &x1, &y1); while (scanf("%lf,%lf", &x2,&y2)==2) { s+=area3(x0, y0, x1, y1, x2, y2); x1=x2; y1=y2; } printf("%.6lf\n", s); 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>
#include<cmath>
#include<cstdio>

using namespace std;

const int MAX = 20;
typedef pair<long double,long double> P;
P data[MAX];
int rev;
long double ans;

long double getlength(int i, int j){
  return sqrt((data[i].first - data[j].first)*(data[i].first - data[j].first)+
	      (data[i].second - data[j].second)*(data[i].second - data[j].second));

}
void solve(){
  long double num[3];
  for(int i = 1; i < rev-1; i++){
    long double z = 0;
    num[0] = getlength(0,i);
    num[1] = getlength(0,i+1);
    num[2] = getlength(i,i+1);
    z  = (num[0]+num[1]+num[2])/2;
    ans += sqrt(z*(z-num[0])*(z-num[1])*(z-num[2]));
  }
}
int main(){
  char c;
  while(cin >> data[rev].first >> c >> data[rev].second){
    rev++;
  }
  solve();
  // cout << ans << endl;
  printf("%.6Lf\n",ans);
  return 0;
}

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

#include<cmath>
#include<cstdio>

using namespace std;

const int MAX = 20;
typedef pair<long double,long double> P;
P data[MAX];
int rev;
long double ans;

long double getlength(int i, int j){
  return sqrt((data[i].first - data[j].first)*(data[i].first - data[j].first)+
	      (data[i].second - data[j].second)*(data[i].second - data[j].second));

}
void solve(){
  long double num[3];
  for(int i = 1; i < rev-1; i++){
    long double z = 0;
    num[0] = getlength(0,i);
    num[1] = getlength(0,i+1);
    num[2] = getlength(i,i+1);
    z  = (num[0]+num[1]+num[2])/2;
    ans += sqrt(z*(z-num[0])*(z-num[1])*(z-num[2]));
  }
}
int main(){
  char c;
  // while(cin >> data[rev].first >> c >> data[rev].second){
  // rev++;
  //}
  while(scanf("%Lf %c %Lf",&data[rev].first,&c,&data[rev].second) != EOF)
    rev++;
  solve();
  // cout << ans << endl;
  printf("%.6Lf\n",ans);
  return 0;
}

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

#include <iostream>
#include <cmath>
#include <cstdio>
#include <complex>
#include <vector>
#include <iomanip>
#define EPS 1e-10
#define EQ(a,b) (abs(a - b) < EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()))
using namespace std;

typedef complex<double> P;

double cross (P a, P b) {
    return (a.real() * b.imag() - a.imag() * b.real());
}

bool cmp_x (const P& p, const P& q) {
    if (p.real() != q.real()) return p.real() < q.real();
    else return p.imag() < q.imag();
}
vector<P> convex_hull (vector<P> ps) {
    int n = ps.size(), k = 0;
    vector<P> qs (n * 2);
    sort(ps.begin(), ps.end(), cmp_x);
    for (int i = 0; i < n; i++) {
        while (k > 1 && cross (qs[k-1] - qs[k-2], ps[i] - qs[k-1]) <= 0) k--;
        qs[k++] = ps[i];
    }
    for (int i = n - 2, t = k; i >= 0; i--) {
        while (k > t && cross (qs[k-1] - qs[k-2], ps[i] - qs[k-1]) <= 0) k--;
        qs[k++] = ps[i];
    }
    qs.resize(k-1);
    return qs;
}

double triangle (P a, P b, P c) {
    double x = abs(a-b), y = abs(b-c), z = abs(c-a);
    double Z = (x + y + z) / 2.0;
    return sqrt(Z * (Z - x) * (Z - y) * (Z - z));
}

double area_size (vector<P> v) {
    if (v.size() < 3) return 0;
    double res = 0.0;
    for (int i = 1; i < v.size() - 1; i++) {
        res += triangle(v[0], v[i], v[i+1]);
    }
    return res;
}

int main ()
{
    vector<P> p;
    double a,b;
    while (scanf("%lf,%lf", &a, &b) != EOF) {
        p.push_back(P(a,b));
    }

    auto v = convex_hull(p);
    printf("%.6f\n" , area_size(v));

    return 0;
}

Compiler output:
a.cc: In function 'std::vector<std::complex<double> > convex_hull(std::vector<std::complex<double> >)':
a.cc:25:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   25 |     sort(ps.begin(), ps.end(), cmp_x);
      |     ^~~~
      |     sqrt
Language: C++

#include <complex>
#include <cmath>
typedef complex<double> xy_t;
xy_t P[110];

int main(){
  int N = 0;
  double x,y ;
  while(scanf("%lf,%lf",&x,&y)){
    P[N++] =xy_t(x,y);
  }
  double sum = 0.0;
  for (int i=0;i+2<N;++i){
    xy_t a=P[0],b=P[i+1], c= P[i+2];
    sum += ((b.real()-a.real())*(c.imag()-a.imag())+(c.real()-a.real())*(b.imag()-a.imag()))/2.0
  }
  printf("%.6f\n",abs(sum));
}

Compiler output:
a.cc:3:9: error: 'complex' does not name a type
    3 | typedef complex<double> xy_t;
      |         ^~~~~~~
a.cc:4:1: error: 'xy_t' does not name a type
    4 | xy_t P[110];
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:5: error: 'P' was not declared in this scope
   10 |     P[N++] =xy_t(x,y);
      |     ^
a.cc:10:13: error: 'xy_t' was not declared in this scope
   10 |     P[N++] =xy_t(x,y);
      |             ^~~~
a.cc:14:5: error: 'xy_t' was not declared in this scope
   14 |     xy_t a=P[0],b=P[i+1], c= P[i+2];
      |     ^~~~
a.cc:15:14: error: 'b' was not declared in this scope
   15 |     sum += ((b.real()-a.real())*(c.imag()-a.imag())+(c.real()-a.real())*(b.imag()-a.imag()))/2.0
      |              ^
a.cc:15:23: error: 'a' was not declared in this scope
   15 |     sum += ((b.real()-a.real())*(c.imag()-a.imag())+(c.real()-a.real())*(b.imag()-a.imag()))/2.0
      |                       ^
a.cc:15:34: error: 'c' was not declared in this scope
   15 |     sum += ((b.real()-a.real())*(c.imag()-a.imag())+(c.real()-a.real())*(b.imag()-a.imag()))/2.0
      |                                  ^
Language: C++

#include<iostream>
#include<complex>
#include<cmath>
typedef complex<double> comp;

double crs_prod(comp a, comp b) { return (conj(a)*b).imag(); }

double c1, c2;
double area = 0;
comp z[20];
int n = 0;
int main(){
	while(~scanf("%lf,%lf", &c1, &c2)){
		z[n] = comp(c1, c2);
		n++;
	}
	for(int i=1; i<n-1; i++){
		area += crs_prod(z[i]-z[0], z[i+1]-z[0])/2;
	}
	printf("%f",area>0 ? area : -area);
	return 0;
}

Compiler output:
a.cc:4:9: error: 'complex' does not name a type
    4 | typedef complex<double> comp;
      |         ^~~~~~~
a.cc:6:17: error: 'comp' was not declared in this scope
    6 | double crs_prod(comp a, comp b) { return (conj(a)*b).imag(); }
      |                 ^~~~
a.cc:6:25: error: 'comp' was not declared in this scope
    6 | double crs_prod(comp a, comp b) { return (conj(a)*b).imag(); }
      |                         ^~~~
a.cc:6:31: error: expression list treated as compound expression in initializer [-fpermissive]
    6 | double crs_prod(comp a, comp b) { return (conj(a)*b).imag(); }
      |                               ^
a.cc:10:1: error: 'comp' does not name a type
   10 | comp z[20];
      | ^~~~
a.cc: In function 'int main()':
a.cc:14:17: error: 'z' was not declared in this scope
   14 |                 z[n] = comp(c1, c2);
      |                 ^
a.cc:14:24: error: 'comp' was not declared in this scope
   14 |                 z[n] = comp(c1, c2);
      |                        ^~~~
a.cc:18:34: error: 'z' was not declared in this scope
   18 |                 area += crs_prod(z[i]-z[0], z[i+1]-z[0])/2;
      |                                  ^
a.cc:18:56: error: 'crs_prod' cannot be used as a function
   18 |                 area += crs_prod(z[i]-z[0], z[i+1]-z[0])/2;
      |                                                        ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <complex.h>
#include <cmath.h>

using namespace std;

type of complex<double> xy_t;
xy_t P[110];
int main(){
  int N = 0;
  double x,y;
  while(scanf("%lf,%lf",&x, &y)) {
  P[N++] = xy_t(x,y);
  double sum = 0.0;
  for(int i = 0; i+ 2<N; ++i) {
    xy_t a=P[0], b=P[i+1], c=P[i+2];
    sum += conj(b-a)*(c-a).imag();
  }
  
  pritntf("%.6f\n",abs(sum));

}
  return 0;
}

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

#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <complex>
#include <cmath>

using namespace std;

typedef complex<double> xy_t;

xy_t P[110];
int main(){
  int N = 0;
  double x,y;
  while(-scanf("%lf,%lf",&x, &y)) {
  P[N++] = xy_t(x,y);
  double sum = 0.0;
  for(int i = 0; i+ 2<N; ++i) {
    xy_t a=P[0], b=P[i+1], c=P[i+2];
    sum += (conj(b-a)*(c-a)).imag()/2;
  }
}

  printf("%.6f\n",abs(sum));
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:23: error: 'sum' was not declared in this scope
   25 |   printf("%.6f\n",abs(sum));
      |                       ^~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main(){
	double x[20], y[20], a, b, c, s = 0.0, z;
	int i;
	for (i = 0; i < 20; i++){
		if (scanf_s("%lf,%lf", &x[i], &y[i]) == EOF) break;
	}
	for (int j = 1; j < i - 1; j++){
		a = sqrt((x[j] - x[0]) * (x[j] - x[0]) + (y[j] - y[0]) * (y[j] - y[0]));
		b = sqrt((x[j + 1] - x[0]) * (x[j + 1] - x[0]) + (y[j + 1] - y[0]) * (y[j + 1] - y[0]));
		c = sqrt((x[j + 1] - x[j]) * (x[j + 1] - x[j]) + (y[j + 1] - y[j]) * (y[j + 1] - y[j]));
		z = (a + b + c) / 2.0;
		s += sqrt(z * (z - a) * (z - b) * (z - c));
	}
	printf("%.5f\n",s);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |                 if (scanf_s("%lf,%lf", &x[i], &y[i]) == EOF) break;
      |                     ^~~~~~~
      |                     scanf
Language: C++


#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <ctime>
#include <string>
#include <map>
#include <stack>
#include <queue>
#include <complex>

using namespace std;

typedef complex<double> xy_t;
char c;
xy_t P[20];
const int MAX = 10000000;

int main(void){

	for (int i = 0; i < 20; ++i){
		P[i] = xy_t(MAX, MAX);
	}

	for (int i = 0; i < 20; ++i){
		double x, y;
		cin >> x >> c >> y;
		P[i] = xy_t(x, y);
	}
	double ans = 0;

	for(int i = 1; i < 20; i++){
		if(P[i + 1].real() != MAX){
			ans += cross_product(xy_t (P[i] - P[0]), xy_t (P[i + 1] - P[0]))
		}
	}

	cout << ans << endl;
	
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:32: error: 'cross_product' was not declared in this scope
   37 |                         ans += cross_product(xy_t (P[i] - P[0]), xy_t (P[i + 1] - P[0]))
      |                                ^~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <complex>
#include <cmath>
using namespace std;

int main() {
	typedef complex<double> xy;
	double x1, y1, x2, y2, s;
	xy z1, z2;
	s = 0.0;
	scanf( "%lf, %lf", &x1, &y1 );
	while ( scanf( "%lf, %lf", &x2, &y2 ) {
		z1 = xy( x1, y1 );
		z2 = xy( x2, y2 );
		s += ( conj( z1 ) * z2 ).real() / 2;
		x1 = x2;
		y1 = y2;
	}
	printf( "%.6f?\n", abs(s) );
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:46: error: expected ')' before '{' token
   12 |         while ( scanf( "%lf, %lf", &x2, &y2 ) {
      |               ~                              ^~
      |                                              )
Language: C++

#include <iostream>
#include <complex>
#include <cmath>
#include <cstdio>
using namespace std;

int main() {
	typedef complex<double> xy;
	xy p[20];
	int n = 0;
	double x, y, s;
	while ( ~scanf( "%lf, %lf", &x, &y ) ) {
		p[n++] = xy( x, y );
	}
	for ( i = 1; i < n - 1; i++ ) {
		s += ( conj( p[i] - p[0] ) * ( p[i + 1] - p[0] ) ).real() / 2;
	}
	printf( "%.6f\n", abs(s) );
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'i' was not declared in this scope
   15 |         for ( i = 1; i < n - 1; i++ ) {
      |               ^
Language: C++

#include <iostream>
#include <complex>
#include <cmath>
#include <cstdio>
using namespace std;

int main() {
	typedef complex<double> xy;
	xy p[20];
	int n = 0;
	double x, y, s;
	while ( ~scanf( "%lf, %lf", &x, &y ) ) {
		p[n++] = xy( x, y );
	}
	for ( i = 1; i < n - 1; i++ ) {
		s += ( conj( p[i] - p[0] ) * ( p[i + 1] - p[0] ) ).imag() / 2;
	}
	printf( "%.6f\n", abs(s) );
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'i' was not declared in this scope
   15 |         for ( i = 1; i < n - 1; i++ ) {
      |               ^
Language: C++

#include <complex>
#include <cmath>
#include <stdio.h>
typedef complex<double> xy_t;
using namespace std;

xy_t P[110];

int main(){
	int N = 0;
	double x, y;
	while (~scanf("%lf,%lf", &x, &y)) {
		P[N++] = xy_t(x,y);
	}
	double sum = 0.0;
	for (int i = 0; i+2 < N; i++) {
		xy_t a = P[0], b = P[i+1], c = P[i+2];
		sum += (conj(b-a)*(c-a)).imag())/2;
	}
	printf("%.6f\n",abs(sum));
}

Compiler output:
a.cc:4:9: error: 'complex' does not name a type
    4 | typedef complex<double> xy_t;
      |         ^~~~~~~
a.cc:7:1: error: 'xy_t' does not name a type
    7 | xy_t P[110];
      | ^~~~
a.cc: In function 'int main()':
a.cc:13:17: error: 'P' was not declared in this scope
   13 |                 P[N++] = xy_t(x,y);
      |                 ^
a.cc:13:26: error: 'xy_t' was not declared in this scope
   13 |                 P[N++] = xy_t(x,y);
      |                          ^~~~
a.cc:17:17: error: 'xy_t' was not declared in this scope
   17 |                 xy_t a = P[0], b = P[i+1], c = P[i+2];
      |                 ^~~~
a.cc:18:30: error: 'b' was not declared in this scope
   18 |                 sum += (conj(b-a)*(c-a)).imag())/2;
      |                              ^
a.cc:18:32: error: 'a' was not declared in this scope
   18 |                 sum += (conj(b-a)*(c-a)).imag())/2;
      |                                ^
a.cc:18:36: error: 'c' was not declared in this scope
   18 |                 sum += (conj(b-a)*(c-a)).imag())/2;
      |                                    ^
Language: C++

#include <iostream>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cctype>
 
using namespace std;
 
typedef long long ll;
#define FOR(i,a,b) for(int i=(a);i<(int)(b);++i)
#define rep(i,n) FOR(i,0,n)

vector<double> x, y;

double __pow(double a) {
    return a * a;
}

int main() {
    double px,py;
    while(~scanf("%lf,%lf",&px,&py)) {
        x.push_back(px); y.push_back(py);
    }

    int n = x.size();
    double s = 0;
    FOR(i,2,n) {
        double a = sqrt(__pow(x[0]-x[i-1]) + __pow(y[0]-y[i-1]));
        double b = sqrt(__pow(x[0]-x[i]) + __pow(y[0]-y[i]));
        double c = sqrt(__pow(x[i-1]-x[i]) + __pow(y[i-1]-y[i]));
        double z = (a+b+c) / 2.0;
        s += sqrt(z * (z-a) * (z-b) * (z-c));
    }

    printf("%.15lf\n", s);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:20: error: 'sqrt' was not declared in this scope
   28 |         double a = sqrt(__pow(x[0]-x[i-1]) + __pow(y[0]-y[i-1]));
      |                    ^~~~
Language: C++

#define	_USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <cctype>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <string>
#include <set>
#include <complex>
#include <utility>
#include <numeric>
using namespace std;
typedef pair<double,double> P;


int main(){
	
	P p[50];
	char c;
	double ans=0;
	int n=1;
	while(cin>>p[n].first>>c>>p[n].second,p[n])
		n++;

	p[n].first=p[1].first;
	p[n].second=p[1].second;
	
	
	for(int i=1;i<=n;i++){
		double s=0;
		s=(p[i].first-p[i+1].first)*(p[i].second+p[i+1].second);
		ans+=s;
	}
	
	printf("%.6f\n",abs(ans)/2);
	
	
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:46: error: could not convert '(((void)(& std::operator>><char, char_traits<char> >((* & std::cin.std::basic_istream<char>::operator>>(p[n].std::pair<double, double>::first)), c))->std::basic_istream<char>::operator>>(p[n].std::pair<double, double>::second)), p[n])' from 'P' {aka 'std::pair<double, double>'} to 'bool'
   31 |         while(cin>>p[n].first>>c>>p[n].second,p[n])
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
      |                                              |
      |                                              P {aka std::pair<double, double>}
Language: C++

#include <iostream>
#include <cmath>
#include <complex>
using namespace std;

int main(){
  int n=0;
  double x,y;
  complex<double> v[20];
  while(cin >> x >> y){
    v[n]=complex<double>(x,y);
    n++;
  }

  double s=0.0;
  for(int i=1;(i+1)<n;i++){
    s+=abs((conj(v[i]-v[0])*(v[i+1]-v[0])).imag())
  }

  cout << s << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:51: error: expected ';' before '}' token
   17 |     s+=abs((conj(v[i]-v[0])*(v[i+1]-v[0])).imag())
      |                                                   ^
      |                                                   ;
   18 |   }
      |   ~
Language: C++

#include<stdio.h>
    
</stdio.h>
typedef struct vec vec;

struct vec {
    double x, y;
};



/* 便利なコンストラクタ関数*/
static vec P(double x, double y) {
    vec p = {x, y};
    return p;
}

static vec add(vec a,vec b){
    returnVec(a.x + b.y, a.y + b.y);
    }
    

int main(void){
    vec a　= {1.0,2.0};
    vec b = Vec{2.0,3.0};
    vec c = add(a,b);
    printf("(%f,%f)\n", c.x, c.y);
    return 0;
    }








Compiler output:
a.cc:24:9: error: extended character 　 is not valid in an identifier
   24 |     vec a　= {1.0,2.0};
      |         ^
a.cc:3:1: error: expected unqualified-id before '<' token
    3 | </stdio.h>
      | ^
a.cc: In function 'vec add(vec, vec)':
a.cc:19:5: error: 'returnVec' was not declared in this scope
   19 |     returnVec(a.x + b.y, a.y + b.y);
      |     ^~~~~~~~~
a.cc:20:5: warning: no return statement in function returning non-void [-Wreturn-type]
   20 |     }
      |     ^
a.cc: In function 'int main()':
a.cc:25:13: error: 'Vec' was not declared in this scope; did you mean 'vec'?
   25 |     vec b = Vec{2.0,3.0};
      |             ^~~
      |             vec
a.cc:26:17: error: 'a' was not declared in this scope
   26 |     vec c = add(a,b);
      |                 ^
Language: C++

#include<stdio.h>
    
</stdio.h>
typedef struct vec vec;

struct vec {
    double x, y;
};



/* 便利なコンストラクタ関数*/
static vec P(double x, double y) {
    vec p = {x, y};
    return p;
}

static vec add(vec a,vec b){
    return Vec(a.x + b.y, a.y + b.y);
    }
    
static vec add(vec a,vec b){
    return Vec(a.x - b.y, a.y - b.y);
    }

static double norm(vec a){
    return sqrt(a.x * b.y, a.y * b.x);
    }

static double dot(vec a,vec b){
    return a.x * b.y - a.y * b.x;
    }


int main(void){
    vec a　= {1.0,2.0};
    vec b = Vec{2.0,3.0};
    vec c = add(a,b);
    printf("(%f,%f)\n", c.x, c.y);
    printf("dot %f\n",dot(a , b));
    printf("ceoss %f\n", cross(a,b));
    
    
    return 0;
    }




Compiler output:
a.cc:36:9: error: extended character 　 is not valid in an identifier
   36 |     vec a　= {1.0,2.0};
      |         ^
a.cc:3:1: error: expected unqualified-id before '<' token
    3 | </stdio.h>
      | ^
a.cc: In function 'vec add(vec, vec)':
a.cc:19:12: error: 'Vec' was not declared in this scope; did you mean 'vec'?
   19 |     return Vec(a.x + b.y, a.y + b.y);
      |            ^~~
      |            vec
a.cc: At global scope:
a.cc:22:12: error: redefinition of 'vec add(vec, vec)'
   22 | static vec add(vec a,vec b){
      |            ^~~
a.cc:18:12: note: 'vec add(vec, vec)' previously defined here
   18 | static vec add(vec a,vec b){
      |            ^~~
a.cc: In function 'vec add(vec, vec)':
a.cc:23:12: error: 'Vec' was not declared in this scope; did you mean 'vec'?
   23 |     return Vec(a.x - b.y, a.y - b.y);
      |            ^~~
      |            vec
a.cc: In function 'double norm(vec)':
a.cc:27:23: error: 'b' was not declared in this scope
   27 |     return sqrt(a.x * b.y, a.y * b.x);
      |                       ^
a.cc:27:12: error: 'sqrt' was not declared in this scope
   27 |     return sqrt(a.x * b.y, a.y * b.x);
      |            ^~~~
a.cc: In function 'int main()':
a.cc:37:13: error: 'Vec' was not declared in this scope; did you mean 'vec'?
   37 |     vec b = Vec{2.0,3.0};
      |             ^~~
      |             vec
a.cc:38:17: error: 'a' was not declared in this scope
   38 |     vec c = add(a,b);
      |                 ^
a.cc:41:26: error: 'cross' was not declared in this scope
   41 |     printf("ceoss %f\n", cross(a,b));
      |                          ^~~~~
Language: C++

#include<stdio.h>
    
</stdio.h>
typedef struct vec vec;

struct vec {
    double x, y;
};



/* 便利なコンストラクタ関数*/
static vec P(double x, double y) {
    vec p = {x, y};
    return p;
}

static vec add(vec a,vec b){
    return Vec(a.x + b.y, a.y + b.y);
    }
    
static vec add(vec a,vec b){
    return Vec(a.x - b.y, a.y - b.y);
    }

static double norm(vec a){
    return sqrt(a.x * b.y, a.y * b.x);
    }

static double dot(vec a,vec b){
    return a.x * b.y - a.y * b.x;
    }


int main(void){
    vec a　= {1.0,2.0};
    vec b = Vec{2.0,3.0};
    vec c = add(a,b);
    printf("(%f,%f)\n", c.x, c.y);
    printf("dot %f\n",dot(a , b));
    printf("cross %f\n", cross(a,b));
    
    
    return 0;
    }





Compiler output:
a.cc:36:9: error: extended character 　 is not valid in an identifier
   36 |     vec a　= {1.0,2.0};
      |         ^
a.cc:3:1: error: expected unqualified-id before '<' token
    3 | </stdio.h>
      | ^
a.cc: In function 'vec add(vec, vec)':
a.cc:19:12: error: 'Vec' was not declared in this scope; did you mean 'vec'?
   19 |     return Vec(a.x + b.y, a.y + b.y);
      |            ^~~
      |            vec
a.cc: At global scope:
a.cc:22:12: error: redefinition of 'vec add(vec, vec)'
   22 | static vec add(vec a,vec b){
      |            ^~~
a.cc:18:12: note: 'vec add(vec, vec)' previously defined here
   18 | static vec add(vec a,vec b){
      |            ^~~
a.cc: In function 'vec add(vec, vec)':
a.cc:23:12: error: 'Vec' was not declared in this scope; did you mean 'vec'?
   23 |     return Vec(a.x - b.y, a.y - b.y);
      |            ^~~
      |            vec
a.cc: In function 'double norm(vec)':
a.cc:27:23: error: 'b' was not declared in this scope
   27 |     return sqrt(a.x * b.y, a.y * b.x);
      |                       ^
a.cc:27:12: error: 'sqrt' was not declared in this scope
   27 |     return sqrt(a.x * b.y, a.y * b.x);
      |            ^~~~
a.cc: In function 'int main()':
a.cc:37:13: error: 'Vec' was not declared in this scope; did you mean 'vec'?
   37 |     vec b = Vec{2.0,3.0};
      |             ^~~
      |             vec
a.cc:38:17: error: 'a' was not declared in this scope
   38 |     vec c = add(a,b);
      |                 ^
a.cc:41:26: error: 'cross' was not declared in this scope
   41 |     printf("cross %f\n", cross(a,b));
      |                          ^~~~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int main(){
  double x[3],y[3],s=0,z,a,b,c;
  char cc;
  cin>>x[0]>>cc>>y[0]>>x[1]>>cc>>y[1];
  for(int i=1;cin>>x[i%2+1]>>cc>>y[i%2+1];i++){
    for(int i=0;i<3;i++)a[i] = sqrt((x[i%3]-x[(i+1)%3])*(x[i%3]-x[(i+1)%3])+(y[i%3]-y[(i+1)%3])*(y[i%3]-y[(i+1)%3]));
    z=(a+b+c)/2;s += sqrt(z*(z-a)*(z-b)*(z-c));
  }
  printf("%.7f\n",s);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: invalid types 'double[int]' for array subscript
    9 |     for(int i=0;i<3;i++)a[i] = sqrt((x[i%3]-x[(i+1)%3])*(x[i%3]-x[(i+1)%3])+(y[i%3]-y[(i+1)%3])*(y[i%3]-y[(i+1)%3]));
      |                          ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
int main(){
	double x,y,sum=0;
	double x1,x2,y1,y2,x3,y3,s,a,b,c;
	scanf("%lf,%lf",&x1,&y1);
	scanf("%lf,%lf",&x2,&y2);
	while(scanf("%lf,%lf",&x3,&y3)!=EOF){
		a=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		b=sqrt((x2-x3)*(x2-x3)+(y2-y3)*(y2-y3));
		c=sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3));
		s=(a+b+c)/2;
		sum+=sqrt(s*(s-a)*(s-b)*(s-c));
		x2=x3;y2=y3;
		
	}
	printf("%.6lf\n",sum);
	return 0;
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'sqrt' was not declared in this scope
   11 |                 a=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
      |                   ^~~~
Language: C++


import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main {

	int INF = 1 << 28;
	void run() {
		Scanner sc = new Scanner(System.in);
		double s = 0;
		double[] x = new double[3];
		double[] y = new double[3];
		String[] str = sc.next().split(",");
		x[0] = Double.parseDouble(str[0]);
		y[0] = Double.parseDouble(str[1]);
		str = sc.next().split(",");
		x[2] = x[1] = Double.parseDouble(str[0]);
		y[2] = y[1] = Double.parseDouble(str[1]);
		
		while(sc.hasNext()) {
			x[1] = x[2];
			y[1] = y[1];
			str = sc.next().split(",");
			x[2] = Double.parseDouble(str[0]);
			y[2] = Double.parseDouble(str[1]);
			s += area( line(x, y) );
		}
		System.out.println(s);
	}
	double[] line(double[] x, double[] y) {
		double[] d = new double[3];
		for(int i=0;i<3;i++) {
			d[i] = sqrt( (x[i]-x[(i+1)%3])*(x[i]-x[(i+1)%3]) + (y[i]-y[(i+1)%3])*(y[i]-y[(i+1)%3]) );
		}
		return d;
	}
	
	double area(double[] d) {
		double len = d[0] + d[1] + d[2];
		return sqrt( len * (len-d[0]) * (len-d[1]) * (len-d[2]) );
	}
	
	public static void main(String[] args) {
		new Main().run();
	}
}

Compiler output:
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import static java.lang.Math.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import static java.util.Arrays.*;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
Language: C++

#include<cmath>
#include<algorithm>
#include<iostream>
#include<vector>
#include<cstdio>

using namespace std;

double EPS = 1e-10;
const double PI = acos(-1);

double add(double a, double b){
  if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0;
  return a+b;
}

struct point{
  double x, y;
  point(){}
  point(double x,double y) : x(x) , y(y){}

  point operator + (point p){
    return point(add(x,p.x), add(y,p.y));
  }

  point operator - (point p){
    return point(add(x,-p.x), add(y,-p.y));
  }

  point operator * (double d){
    return point(x*d,y*d);
  }

  point operator / (double d){
    return point(x/d,y/d);
  }
  
  bool operator == ( const point &p ) const {
    return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS;
  }
};

struct segment{
  point a,b;
};

double dot(point a, point b) {
  return (a.x * b.x + a.y * b.y);
}

double cross(point a, point b) {
  return (a.x * b.y - a.y * b.x);
}

double vec_abs(point a){
  return sqrt(a.x*a.x+a.y*a.y);
}

int ccw(point p0, point p1, point p2){
  point a = p1 - p0;
  point b = p2 - p0;
  if(cross(a,b)>EPS)return +1;
  if(cross(a,b)<EPS)return -1;
  if(dot(a,b)<-EPS)return +2;
  if(a.x*a.x+a.y*a.y<b.x*b.x+b.y*b.y)return -2;
  return 0;
}

vector<segment> construct_edge(point* p, int n){
  vector<segment>seg,seg2;
  segment temp;
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      if(i!=j){
	temp.a=p[i];
	temp.b=p[j];
	seg.push_back(temp);
      }
    }
  }

  int t=seg.size();
  for(int i=0;i<t;i++){
    int fg=0;
    for(int j=0;j<t;j++){
      if(i!=j && vec_abs(seg[i].b-seg[j].a)<=EPS){
	if(ccw(seg[i].a,seg[i].b,seg[j].b)==1){
	  fg=1;
	  break;
	}
      }
    }
    if(!fg)seg2.push_back(seg[i]);
  }
  return seg2;
}

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

#include<cmath>
#include<algorithm>
#include<iostream>
#include<vector>
#include<cstdio>

using namespace std;

double EPS = 1e-10;
const double PI = acos(-1);

double add(double a, double b){
  if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0;
  return a+b;
}

struct point{
  double x, y;
  point(){}
  point(double x,double y) : x(x) , y(y){}

  point operator + (point p){
    return point(add(x,p.x), add(y,p.y));
  }

  point operator - (point p){
    return point(add(x,-p.x), add(y,-p.y));
  }

  point operator * (double d){
    return point(x*d,y*d);
  }

  point operator / (double d){
    return point(x/d,y/d);
  }
  
  bool operator == ( const point &p ) const {
    return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS;
  }
};

struct segment{
  point a,b;
};

double dot(point a, point b) {
  return (a.x * b.x + a.y * b.y);
}

double cross(point a, point b) {
  return (a.x * b.y - a.y * b.x);
}

double vec_abs(point a){
  return sqrt(a.x*a.x+a.y*a.y);
}

double dist(point a,point b){
  return sqrt(pow(a.x-b.x,2)+pow(a.y-b.y,2));
}

int ccw(point p0, point p1, point p2){
  point a = p1 - p0;
  point b = p2 - p0;
  if(cross(a,b)>EPS)return +1;
  if(cross(a,b)<EPS)return -1;
  if(dot(a,b)<-EPS)return +2;
  if(a.x*a.x+a.y*a.y<b.x*b.x+b.y*b.y)return -2;
  return 0;
}

vector<segment> construct_edge(point* p, int n){
  vector<segment>seg,seg2;
  segment temp;
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      if(i!=j){
	temp.a=p[i];
	temp.b=p[j];
	seg.push_back(temp);
      }
    }
  }

  int t=seg.size();
  for(int i=0;i<t;i++){
    int fg=0;
    for(int j=0;j<t;j++){
      if(i!=j && vec_abs(seg[i].b-seg[j].a)<=EPS){
	if(ccw(seg[i].a,seg[i].b,seg[j].b)==1){
	  fg=1;
	  break;
	}
      }
    }
    if(!fg)seg2.push_back(seg[i]);
  }
  return seg2;
}

/*
double areaPol(point* ps, int n){
  vector<segment>t=construct_edge(ps,n);

  int tsz=t.size();
  double area=0;
  for(int i=0;i<tsz;i++){
    area+=abs((t[i].a.x-t[i].b.x)*(t[i].a.y+t[i].b.y));
  }
  return abs(area)/2.0;
}
*/
/*
double areaPol(point* ps, int n){
  vector<segment>t=construct_edge(ps,n);

  int tsz=t.size();
  point c;
  c.x=c.y=0;
  for(int i=0;i<n;i++)c=c+ps[i];
  c=c/n;

  double area=0;
  for(int i=0;i<tsz;i++){
    double a=dist(t[i].a,t[i].b);
    double b=dist(t[i].a,c);
    double d=dist(t[i].b,c);
    double z=(a+b+d)/2;
    area+=sqrt(z*(z-a)*(z-b)*(z-d));
  }
  return area;
}
*/

int main(void){
  point p[21];
  int n=0;
  char k;
 
 while(cin>>x>>k>>y){
   if(cin.eof())break;
   p[n].x = x;
   p[n].y = y;
   n++;
 }
  p[n]=p[0];
  double s;
  for(int j=0; j<n; j++) 
    s+=(p[j].x-p[j+1].x)*(p[j].y+p[j+1].y);
  printf("%.6f\n",abs(s/2));

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:141:13: error: 'x' was not declared in this scope
  141 |  while(cin>>x>>k>>y){
      |             ^
a.cc:141:19: error: 'y' was not declared in this scope
  141 |  while(cin>>x>>k>>y){
      |                   ^
Language: C++

#include <iostream>
#include <cmath>

int main() {
	double cx[20], cy[20];
	int i;
	double a, b, c, z;
	double S;
	char dummy;
	
	i=0;
	while( std::cin >> cx[i] >> dummy >> cy[i] ) i++; i++;

	S = 0.0;
	for( int j=0; j<i-2; j++) {
		a = sqrt( (cx[0]-cx[j+1])*(cx[0]-cx[j+1]) + (cy[0]-cy[j+1])*(cy[0]-cy[j+1]) );
		b = sqrt( (cx[0]-cx[j+2])*(cx[0]-cx[j+2]) + (cy[0]-cy[j+2])*(cy[0]-cy[j+2]) );
		c = sqrt( (cx[j+1]-cx[j+2])*(cx[j+1]-cx[j+2]) + (cy[j+1]-cy[j+2])*(cy[j+1]-cy[j+2]) );
		z = ( a + b + c ) / 2.0;
		
		S += sqrt( z*(z-a)*(z-b)*(z-c) );
	}
	
	std::cout << S << std::endl;
	return 0;

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

#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;


int main(){
	char _;	
	int n=0;
	double x[21],y[21];
	while(cin>>x[n]>>_>>y[n])n++;
	x[n]=x[0];y[n]=y[0];
	double s=0;
	for(int i=0;i<n;i++){
		s += x[i]*y[i+1] - y[i]*x[i+1];
	}
	printf("%.6f\n",fabs(s/2));
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   17 |         printf("%.6f\n",fabs(s/2));
      |                         ^~~~
      |                         labs
Language: C++

#include <iostream>
#include <vector>
vector<double> X,Y;
int main(){
	double x,y,s=0;
	int i,n=0;
	char c;
	while(std::cin>>x>>c>>y){
		X.push_back(x);
		Y.push_back(y);
		n++;
	}
	X.push_back(X[0]);
	Y.push_back(Y[0]);
	for(i=0;i<n;i++)
		s+=(X[i]*Y[i+1]-X[i+1]*Y[i]);
	std::cout<<abs(s)/2<<endl;
}

Compiler output:
a.cc:3:1: error: 'vector' does not name a type
    3 | vector<double> X,Y;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:9:17: error: 'X' was not declared in this scope
    9 |                 X.push_back(x);
      |                 ^
a.cc:10:17: error: 'Y' was not declared in this scope
   10 |                 Y.push_back(y);
      |                 ^
a.cc:13:9: error: 'X' was not declared in this scope
   13 |         X.push_back(X[0]);
      |         ^
a.cc:14:9: error: 'Y' was not declared in this scope
   14 |         Y.push_back(Y[0]);
      |         ^
a.cc:17:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |         std::cout<<abs(s)/2<<endl;
      |                              ^~~~
      |                              std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <cstdlib>
#include <iostream>
#include <vector>
vector<double> X,Y;
int main(){
	double x,y,s=0;
	int i,n=0;
	char c;
	while(std::cin>>x>>c>>y){
		X.push_back(x);
		Y.push_back(y);
		n++;
	}
	X.push_back(X[0]);
	Y.push_back(Y[0]);
	for(i=0;i<n;i++)
		s+=(X[i]*Y[i+1]-X[i+1]*Y[i]);
	std::cout<<abs(s)/2<<endl;
}

Compiler output:
a.cc:4:1: error: 'vector' does not name a type
    4 | vector<double> X,Y;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:10:17: error: 'X' was not declared in this scope
   10 |                 X.push_back(x);
      |                 ^
a.cc:11:17: error: 'Y' was not declared in this scope
   11 |                 Y.push_back(y);
      |                 ^
a.cc:14:9: error: 'X' was not declared in this scope
   14 |         X.push_back(X[0]);
      |         ^
a.cc:15:9: error: 'Y' was not declared in this scope
   15 |         Y.push_back(Y[0]);
      |         ^
a.cc:18:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |         std::cout<<abs(s)/2<<endl;
      |                              ^~~~
      |                              std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <cstdlib>
#include <cstdio>
#include <iostream>
int main(){
	double x0,y0,x1,y1,x, y, s = 0;
	char c;
	std::cin >> x0 >> c >> y0;
	x1 = x0; y1 = y0;
	while(std::cin>>x>>c>>y){
		s += x1*y - y1*x;
		x1 = x;
		y1 = y;
	}
	s += x1*y0 - y1*x0;
		printf("%.6f\n", fabs(s / 2));

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:34: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   15 |                 printf("%.6f\n", fabs(s / 2));
      |                                  ^~~~
      |                                  labs
Language: C++

#include <iostream>
int main(){
	double x0,y0,x1,y1,x,y,s=0;
	char c;
	std::cin>>x0>>c>>y0;
	x1=x0;y1=y0;
	while(std::cin>>x>>c>>y){
		s+=x1*y-y1*x;
		x1=x;y1=y;
	}
	s+=x1*y0-y1*x0;
	std::cout<<fabs((s<0?-s:s)/2)<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   12 |         std::cout<<fabs((s<0?-s:s)/2)<<"\n";
      |                    ^~~~
      |                    labs
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		double q;
		while ((q = in.nextDouble() >= 1) {
			double xn = q / 2.0;
			double checkVal = Math.pow(xn, 3.0) - q;
			while (Math.abs(checkVal) >= 0.00001 * q) {
				checkVal = Math.pow(xn, 3.0) - q;
				xn = xn - (checkVal) / (Math.pow(xn, 2) * 3.0);
			}
			System.out.println(xn);

		}
	}
}

Compiler output:
Main.java:7: error: ')' expected
		while ((q = in.nextDouble() >= 1) {
		                                 ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.MathContext;
import java.math.RoundingMode;

public class AOJ_0080
{

  public static void main(String[] args) throws NumberFormatException, IOException
  {
    BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

    while (input.ready())
    {
      double num = Double.valueOf(input.readLine());
      if (num < 0)
      {
        break;
      }
      MathContext mc = new MathContext(7, RoundingMode.HALF_DOWN);
      BigDecimal ans = new BigDecimal(getThirdRoot(num, num / 2)).round(mc);
      System.out.println(ans.toPlainString());
    }

  }

  private static float getThirdRoot(double q, double x)
  {
    if (Math.abs(Math.pow(x, 3) - q) < 0.00001 * q)
    {
      return (float) x;
    }

    return getThirdRoot(q, (float) (x - ((Math.pow(x, 3) - q) / (3 * Math.pow(x, 2)))));

  }

}

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

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

int main(void){
  int q;
  double xn,x1,k;
  while(scanf("%d",&q)!=EOF){
    if(q==-1) break;
    else{
      n=0;
      x1=(double)q/2.0;
      //printf("x1:%.6f\n",x1);
      while(fabs(x1*x1*x1-q)>=(0.00001*q)){
	k=(x1*x1*x1-q)/(3*x1*x1);
	xn=x1-k;
	x1=xn;
	//printf("//%.6f\n",x1);
	
      }
      printf("%.6f\n",x1);
    }
  }
  return 0;
}

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

#include <stdio.h>double zenka(double q){    double x=q/2;        while(x*x*x-q>=0.00001*q || x*x*x-q<=-0.00001*q)    {        x=x-((x*x*x)-q)/(3*x*x);    }        return x;}int main(void){    int q;        while(1)    {        scanf("%d",&q);        if(q==-1) break;        else        {            printf("%.7f\n",zenka(q));        }    }        return 0;}


Compiler output:
main.c:1:19: warning: extra tokens at end of #include directive
    1 | #include <stdio.h>double zenka(double q){    double x=q/2;        while(x*x*x-q>=0.00001*q || x*x*x-q<=-0.00001*q)    {        x=x-((x*x*x)-q)/(3*x*x);    }        return x;}int main(void){    int q;        while(1)    {        scanf("%d",&q);        if(q==-1) break;        else        {            printf("%.7f\n",zenka(q));        }    }        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 <stdio.h>
#include <math.h>
int main(void){
    int q;
    while(scanf("%d", &q)!= EOF) {
        double x;    
        x=(double)q/2.0;
        if(q>0)  {
            double xx;
            while((fabs(x*x*x-q))>(0.00001*q)){
                xx=x-((x*x*x-q)/(3*x*x));    
                x=xx;
            }
            printf("%.6f\n",xx);
        }
     }
return 0;     
}

三乗根の問題です。
PAIZAでは実行できますが、AOJではWrong　Answerとなってしまいます。


Compiler output:
main.c:20:17: error: stray '\343' in program
   20 | <U+4E09><U+4E57><U+6839><U+306E><U+554F><U+984C><U+3067><U+3059><U+3002>
      |                                                                 ^~~~~~~~
main.c:20:1: error: unknown type name '\U00004e09\U00004e57\U00006839\U0000306e\U0000554f\U0000984c\U00003067\U00003059'
   20 | 三乗根の問題です。
      | ^~~~~~~~~~~~~~~~
main.c:21:24: error: stray '\343' in program
   21 | PAIZA<U+3067><U+306F><U+5B9F><U+884C><U+3067><U+304D><U+307E><U+3059><U+304C><U+3001>AOJ<U+3067><U+306F>Wrong<U+3000>Answer<U+3068><U+306A><U+3063><U+3066><U+3057><U+307E><U+3044><U+307E><U+3059><U+3002>
      |                                                                              ^~~~~~~~
main.c:21:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'AOJ\U00003067\U0000306fWrong'
   21 | PAIZAでは実行できますが、AOJではWrong　Answerとなってしまいます。
      |                          ^~~~~~~~~~~~
main.c:21:38: error: stray '\343' in program
   21 | PAIZA<U+3067><U+306F><U+5B9F><U+884C><U+3067><U+304D><U+307E><U+3059><U+304C><U+3001>AOJ<U+3067><U+306F>Wrong<U+3000>Answer<U+3068><U+306A><U+3063><U+3066><U+3057><U+307E><U+3044><U+307E><U+3059><U+3002>
      |                                                                                                              ^~~~~~~~
main.c:21:26: error: unknown type name 'AOJ\U00003067\U0000306fWrong'
   21 | PAIZAでは実行できますが、AOJではWrong　Answerとなってしまいます。
      |                          ^~~~~~~~~~~~
main.c:21:64: error: stray '\343' in program
   21 | PAIZA<U+3067><U+306F><U+5B9F><U+884C><U+3067><U+304D><U+307E><U+3059><U+304C><U+3001>AOJ<U+3067><U+306F>Wrong<U+3000>Answer<U+3068><U+306A><U+3063><U+3066><U+3057><U+307E><U+3044><U+307E><U+3059><U+3002>
      |                                                                                                                                                                                                    ^~~~~~~~
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
    int q;
    while(scanf("%d", &q)!= EOF) {
        double x;    
        x=(double)q/2;
        if(q>0)  {
            double xx;
            while((fabs(x*x*x-q))>(0.00001*q)){
                xx=x-((x*x*x-q)/(3*x*x));    
                x=xx;
            }
            printf("%.6f\n",xx);
        }
     }
return 0;     
}

三乗根の問題です。
PAIZAでは実行できますが、AOJではWrong　Answerとなってしまいます。


Compiler output:
main.c:20:17: error: stray '\343' in program
   20 | <U+4E09><U+4E57><U+6839><U+306E><U+554F><U+984C><U+3067><U+3059><U+3002>
      |                                                                 ^~~~~~~~
main.c:20:1: error: unknown type name '\U00004e09\U00004e57\U00006839\U0000306e\U0000554f\U0000984c\U00003067\U00003059'
   20 | 三乗根の問題です。
      | ^~~~~~~~~~~~~~~~
main.c:21:24: error: stray '\343' in program
   21 | PAIZA<U+3067><U+306F><U+5B9F><U+884C><U+3067><U+304D><U+307E><U+3059><U+304C><U+3001>AOJ<U+3067><U+306F>Wrong<U+3000>Answer<U+3068><U+306A><U+3063><U+3066><U+3057><U+307E><U+3044><U+307E><U+3059><U+3002>
      |                                                                              ^~~~~~~~
main.c:21:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'AOJ\U00003067\U0000306fWrong'
   21 | PAIZAでは実行できますが、AOJではWrong　Answerとなってしまいます。
      |                          ^~~~~~~~~~~~
main.c:21:38: error: stray '\343' in program
   21 | PAIZA<U+3067><U+306F><U+5B9F><U+884C><U+3067><U+304D><U+307E><U+3059><U+304C><U+3001>AOJ<U+3067><U+306F>Wrong<U+3000>Answer<U+3068><U+306A><U+3063><U+3066><U+3057><U+307E><U+3044><U+307E><U+3059><U+3002>
      |                                                                                                              ^~~~~~~~
main.c:21:26: error: unknown type name 'AOJ\U00003067\U0000306fWrong'
   21 | PAIZAでは実行できますが、AOJではWrong　Answerとなってしまいます。
      |                          ^~~~~~~~~~~~
main.c:21:64: error: stray '\343' in program
   21 | PAIZA<U+3067><U+306F><U+5B9F><U+884C><U+3067><U+304D><U+307E><U+3059><U+304C><U+3001>AOJ<U+3067><U+306F>Wrong<U+3000>Answer<U+3068><U+306A><U+3063><U+3066><U+3057><U+307E><U+3044><U+307E><U+3059><U+3002>
      |                                                                                                                                                                                                    ^~~~~~~~