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

#include<stdio.h>
int main(void)
{
    int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J;
    scanf("%d %d %d %d %d %d\n%d %d %d %d %d %d\n%d %d %d %d %d %d %d",&a,&b,&c,&d,&e,&f,&G,&H,&i,&j,&k,&l,&m,&n,&o,&p,&q,&r);
    s=3600*a+60*b+c;t=3600*d+60*e+f;u=3600*g+60*h+i;v=3600*j+60*k+l;W=3600*m+60*n+o;x=3600*p+60*q+r;
    y=t-x;z=v-u;A=x-w;
    B=y/3600;C=y/60-B*60;D=y-B*3600-C*60;
    E=z/3600;F=z/60-E*60;G=z-E*3600-F*60;
    H=A/3600;I=A/60-H*60;J=A-H*3600-I*60;
    printf("%d %d %d\n%d %d %d\n%d %d %d\n",B,C,D,E,F,G,H,I,J);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:69: error: 'W' undeclared (first use in this function)
    6 |     s=3600*a+60*b+c;t=3600*d+60*e+f;u=3600*g+60*h+i;v=3600*j+60*k+l;W=3600*m+60*n+o;x=3600*p+60*q+r;
      |                                                                     ^
main.c:6:69: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>

int main() {
  cout<<"hello"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 |   cout<<"hello"<<endl;
      |   ^~~~
      |   std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:4:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    4 |   cout<<"hello"<<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++

#include<iostream>
 
int main() {
  std::cout<<"hello"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    4 |   std::cout<<"hello"<<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 "stdafx.h"
#include <iostream>

using namespace std;

long getLongTime(int* t) {
	long longt = 0;
	longt += 60 * 60 * t[0];
	longt += 60 * t[1];
	longt += t[2];
	
	return longt;
}

void getFormattedTime(long longt, int* t) {
	t[0] = longt / (60 * 60);
	longt -= t[0] * (60 * 60);
	t[1] = longt / 60;
	longt -= t[1] * 60;
	t[2] = longt;
}

int main(void){
    int times[3][2][3];
	long longTime[3][3];
	int workTime[3][3];

	for (int i = 0; i < 3; i++) {
		cin >> times[i][0][0] >> times[i][0][1] >> times[i][0][2] >> times[i][1][0] >> times[i][1][1] >> times[i][1][2];
		longTime[i][0] = getLongTime(times[i][0]);
		longTime[i][1] = getLongTime(times[i][1]);
		longTime[i][2] = longTime[i][1] - longTime[i][0];

		getFormattedTime(longTime[i][2], workTime[i]);
	}

	for (int i = 0; i < 3; i++) {
		cout << workTime[i][0] << " " << workTime[i][1] << " " << workTime[i][2] << endl;
	}
}

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

#incude<iostream>
using namespace std;
int main(){
int h1,h2,m1,m2,s1,s2,sum1=0,sum2=0;

cin>>h1>>m1>>s1>>h2>>m2>>s2;
sum1=3600*h1+60*m1+s1;
sum2=3600*h2+60*m2+s2;
sum2-=sum1;
h2=sum2/3600;m2=(sum2%3600)/60;s2=(sum2%3600)%60;
cout<<h2<<" "<<m2<<" "<<s2<<endl;
sum1=0,sum2=0;

cin>>h1>>m1>>s1>>h2>>m2>>s2;
sum1=3600*h1+60*m1+s1;
sum2=3600*h2+60*m2+s2;
sum2-=sum1;
h2=sum2/3600;m2=(sum2%3600)/60;s2=(sum2%3600)%60;
cout<<h2<<" "<<m2<<" "<<s2<<endl;
sum1=0,sum2=0;

cin>>h1>>m1>>s1>>h2>>m2>>s2;
sum1=3600*h1+60*m1+s1;
sum2=3600*h2+60*m2+s2;
sum2-=sum1;
h2=sum2/3600;m2=(sum2%3600)/60;s2=(sum2%3600)%60;
cout<<h2<<" "<<m2<<" "<<s2<<endl;
sum1=0,sum2=0;
return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incude; did you mean #include?
    1 | #incude<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
    6 | cin>>h1>>m1>>s1>>h2>>m2>>s2;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incude<iostream>
a.cc:11:1: error: 'cout' was not declared in this scope
   11 | cout<<h2<<" "<<m2<<" "<<s2<<endl;
      | ^~~~
a.cc:11:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:29: error: 'endl' was not declared in this scope
   11 | cout<<h2<<" "<<m2<<" "<<s2<<endl;
      |                             ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incude<iostream>
Language: C++

int main()
{
	for (int i = 0; i < 3; i++){
		int hin, min, sin, hout, mout, sout, total;
		cin >> hin >> min >> sin >> hout >> mout >> sout;

		total = hout * 3600 + mout * 60 + sout - hin * 3600 - min * 60 - sin;

		cout << hin / 3600 << " " << (total % 3600) / 60 << " " << st << total%60;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope; did you mean 'sin'?
    5 |                 cin >> hin >> min >> sin >> hout >> mout >> sout;
      |                 ^~~
      |                 sin
a.cc:9:17: error: 'cout' was not declared in this scope; did you mean 'sout'?
    9 |                 cout << hin / 3600 << " " << (total % 3600) / 60 << " " << st << total%60;
      |                 ^~~~
      |                 sout
a.cc:9:76: error: 'st' was not declared in this scope; did you mean 'std'?
    9 |                 cout << hin / 3600 << " " << (total % 3600) / 60 << " " << st << total%60;
      |                                                                            ^~
      |                                                                            std
Language: C++

int main()
{
	for (int i = 0; i < 3; i++){
		int hin, min, sin, hout, mout, sout, total;
		cin >> hin >> min >> sin >> hout >> mout >> sout;

		total = hout * 3600 + mout * 60 + sout - hin * 3600 - min * 60 - sin;

		cout << hin / 3600 << " " << (total % 3600) / 60 << " " << total%60;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope; did you mean 'sin'?
    5 |                 cin >> hin >> min >> sin >> hout >> mout >> sout;
      |                 ^~~
      |                 sin
a.cc:9:17: error: 'cout' was not declared in this scope; did you mean 'sout'?
    9 |                 cout << hin / 3600 << " " << (total % 3600) / 60 << " " << total%60;
      |                 ^~~~
      |                 sout
Language: C++

#include<iostream>
using namespace std;
int main(){
for(int i=0;i++i<3){
int h1,m1,s1,h2,m2,s2,ans;
cin>>h1>>m1>>s1>>h2>>m2>>s2;
ans = ((h2*3600)+(m2*60)+s2)-((h1*3600)+(m1*60)+s1);
cout<<ans/3600<<" " <<(ans%3600)/60<<" "<<(ans%3600)%60;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:16: error: expected ';' before 'i'
    4 | for(int i=0;i++i<3){
      |                ^
      |                ;
Language: C++

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

int main(){
	int a[6];
	for(int b=0;b<3;b++){
		for(int c=0;c<6;c++)scanf("%d",&a[c]);
		int d=(a[3]-a[0])*3600+(a[4]-a[1])*60+(a[5]-a[2]);
		printf("%d %d %d\n",d/3600,d%3600/60,d%3600%60)
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:64: error: expected ';' before '}' token
    9 |                 printf("%d %d %d\n",d/3600,d%3600/60,d%3600%60)
      |                                                                ^
      |                                                                ;
   10 |         }
      |         ~
Language: C++

#include <iostream>
using namespace std;
int main(void)
{
	int a,b,c,d,e,f,g,h,i,j,k;
	for (a=0;a<3;a++)
	{
		cin>>b>>c>>d>>e>>f>>g;
		h=e-b;
		j=g-d;
		if (j<0)
		{
			j=60+j;
			i=i-1;
		}
		i=f-c;	
		}
		if (i<0)
		{
			i=60+i;
			h=h-1;
		}
		cout<<h<<" "<<i<<" "<<j<<endl;
	}
	return 0;
}

Compiler output:
a.cc:25:9: error: expected unqualified-id before 'return'
   25 |         return 0;
      |         ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <functional>
#include <algorithm>
#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
#include <stdlib.h>

using namespace std;

int main (void)
{
  int a,aa,aaa,b,bb,bbb,T,TT,TTT;
  for (int i = 0; i < 3; i++)
     {
	  cin >> a >> aa >> aaa >> b >> bb >> bbb;
	  if (aaa > bbb)
	  {
		  if (aa < bb)
		  {
		    bb--;
		    bbb += 60;

	      }
		  else if (aa >= bb)
		  {
			  bb--;
			  bbb += 60;
			  b--;
			  bb += 60;
		  }
	  else if (aaa <= bbb)
	  {
		  if (aa < bb)
		  {
		  }
		  else if (aa > bb)
		  {
			  b--;
			  bb += 60;
		  }
	  }

		  T = b - a;
		  TT = bb - aa;
		  TTT = bbb - aaa;
		  cout << T << " " << TT << " " << TTT << endl;

	  }
 }

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

import java.util.*;
import static java.lang.System.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		while (sc.hasNext()) {
			int arrive = 0;
			for (int i=0; i<3; i++) {
				if (i==0) arrive += sc.nextInt()*3600;
				else if (i==1) arrive += sc.nextInt()*60;
				else if (i==2) arrive += sc.nextInt();
			}
			int leave = 0;
			for (int i=0; i<3; i++) {
				if (i==0) leave += sc.nextInt()*3600;
				else if (i==1) leave += sc.nextInt()*60;
				else if (i==2) leave += sc.nextInt();
			}
			
			int time = leave - arrive;
			int h = time/3600;
			time %= 3600;
			int m = time/60;
			time %= 60;
			int s = time;
			
			out.println(h+" "+m+" "+s);
		}
	}
}


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

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





int main(){
  int a[3][2][3]={};
  for(int i=0;i<3;i++){
    cin>>a[i][0][0]>>a[i][0][1]>>a[i][0][2]>>a[i][1][0]>>a[i][1][1]>>a[i][1][2];
    a[i][0][2]=a[i][1][2]-a[i][0][2];
    if(a[i][0][2]<0){a[i][0][2]+=60; a[i][1][1]-=1;}
    
     a[i][0][1]=a[i][1][1]-a[i][0][1];
    if(a[i][0][1]<0){a[i][0][1]+=60; a[i][1][0]-=1;}
    
    a[i][0][0]=a[i][1][0]-a[i][0][0];
  }

  for(int i=0;i<3;i++){
    cout<<a[i][0][0]<<" "<<a[i][0][1]<<" "<<a[i][0][2]<<endl;
      }

  
    
  retu


Compiler output:
a.cc: In function 'int main()':
a.cc:27:3: error: 'retu' was not declared in this scope
   27 |   retu
      |   ^~~~
a.cc:27:7: error: expected '}' at end of input
   27 |   retu
      |       ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

#include<bits.stdc++.h>
using namespace std;
int main(){
  for(int i = 0; i < 3; i ++){
    int h, m, s, ah, am, as;
    cin>>h>>m>>s>>ah>>am>>as;

    int a, b, c, b;
    a = {(3600 * ah + 60 * am + as) - (3600 * h + 60 * m + s)};
    b = a / 3600;
    c = (a - 3600 * b) / 60;
    d = a - 3600 * b - 60 * c;

    cout<<a<<" "<<b<<" "<<c<<endl;
  }
  return0;
}



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

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;

int main()
{
	//2.すごろく	
	/*
	int n;
	cin >> n;
	int A, _A = 1;
	int k = 0;
	int A_count[100];
	A_count[0] = 1;
	for (int i = 0; i < n; i++)
	{
		cin >> A;
		if (A == 1)
		{
			if (A == _A)
			{
				A_count[k]++;
			}
			else
			{
				k++;
				A_count[k] = 2;
			}
		}
		_A = A;
	}
	sort(A_count, A_count + k + 1);
	cout << A_count[k] << endl;
	*/

	//タイムカード
	int t[2][3];
	int x[3][3];
	for (int n=0; n < 3; n++)
	{
		for (int i=0; i < 2; i++)
			for (int k=0; k < 3; k++)
				cin >> t[i][k];
			
		for (int m = 2; m >= 0; m--)
		{
			x[n][m] = t[1][m] - t[0][m];
			if (t[0][m] > t[1][m])
			{
				x[n][m] += 60;
				x[n][m - 1]--;
			}
		}
	}
	for (int n= 0; n < 3; n++)
	{
		cout << x[n][0] << x[n][1] << x[n][2] <<endl:
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:58:61: error: expected ';' before ':' token
   58 |                 cout << x[n][0] << x[n][1] << x[n][2] <<endl:
      |                                                             ^
      |                                                             ;
Language: C++

#include<iostream>
using namespace std;

int main() {

	for (int i = 0; i < 3; i++) {
		int h, m, s, H, M, S,x,y.z;
		cin >> h >> m >> s >> H >> M >> S;

		if (S - s < 0) {
			z = S + 60 - s;
			if (M - m = 0) {
				H--;
				M = M + 60;
			}
			M--;
		}
		else {
			z = S - s;
		}
		if (M - m < 0) {
			H--;
			y = M + 60 - m;
		}
		else {
			y = M - m;
		}
		x = H - h;

		cout << x << y << z << endl;
	}
	
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:41: error: expected initializer before '.' token
    7 |                 int h, m, s, H, M, S,x,y.z;
      |                                         ^
a.cc:11:25: error: 'z' was not declared in this scope
   11 |                         z = S + 60 - s;
      |                         ^
a.cc:12:31: error: lvalue required as left operand of assignment
   12 |                         if (M - m = 0) {
      |                             ~~^~~
a.cc:19:25: error: 'z' was not declared in this scope
   19 |                         z = S - s;
      |                         ^
a.cc:23:25: error: 'y' was not declared in this scope
   23 |                         y = M + 60 - m;
      |                         ^
a.cc:26:25: error: 'y' was not declared in this scope
   26 |                         y = M - m;
      |                         ^
a.cc:30:30: error: 'y' was not declared in this scope
   30 |                 cout << x << y << z << endl;
      |                              ^
a.cc:30:35: error: 'z' was not declared in this scope
   30 |                 cout << x << y << z << endl;
      |                                   ^
Language: C++

#include<iostream>
using namespace std;

int main() {

	for (int i = 0; i < 3; i++) {
		int h, m, s, H, M, S,x,y,z;
		cin >> h >> m >> s >> H >> M >> S;

		if (S - s < 0) {
			z = S + 60 - s;
			if (M - m = 0) {
				H--;
				M = M + 60;
			}
			M--;
		}
		else {
			z = S - s;
		}
		if (M - m < 0) {
			H--;
			y = M + 60 - m;
		}
		else {
			y = M - m;
		}
		x = H - h;

		cout << x << y << z << endl;
	}
	
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:31: error: lvalue required as left operand of assignment
   12 |                         if (M - m = 0) {
      |                             ~~^~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

struct time{
	int h,m,s;
};

int main(){

	time as,af,bs,bf,cs,cf;
	cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
	cin >> bs.h >> bs.m >> bs.s >> bf.h >> bf.m >> bf.s;
	cin >> cs.h >> cs.m >> cs.s >> cf.h >> cf.m >> cf.s;
	
	int amin = (af.h)*60*60 + (af.m)*60 + af.s - ((as.h)*60*60 + (as.m)*60 + as.s);
	int bmin = (bf.h)*60*60 + (bf.m)*60 + bf.s - ((bs.h)*60*60 + (bs.m)*60 + bs.s);
	int cmin = (cf.h)*60*60 + (cf.m)*60 + cf.s - ((cs.h)*60*60 + (cs.m)*60 + cs.s);

	time retA;
	retA.h = amin / 3600;
	retA.m = (amin % 3600) / 60;
	retA.s = (amin % 3600) % 60;
	time retB;
	retB.h = bmin / 3600;
	retB.m = (bmin % 3600) / 60;
	retB.s = (bmin % 3600) % 60;
	time retC;
	retC.h = cmin / 3600;
	retC.m = (cmin % 3600) / 60;
	retC.s = (cmin % 3600) % 60;

	cout << retA.h << " " << retA.m << " " << retA.s << endl;
	cout << retB.h << " " << retB.m << " " << retB.s << endl;
	cout << retC.h << " " << retC.m << " " << retC.s << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: expected ';' before 'as'
   12 |         time as,af,bs,bf,cs,cf;
      |             ^~~
      |             ;
a.cc:13:16: error: 'as' was not declared in this scope; did you mean 'abs'?
   13 |         cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
      |                ^~
      |                abs
a.cc:13:40: error: 'af' was not declared in this scope
   13 |         cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
      |                                        ^~
a.cc:14:16: error: 'bs' was not declared in this scope; did you mean 'abs'?
   14 |         cin >> bs.h >> bs.m >> bs.s >> bf.h >> bf.m >> bf.s;
      |                ^~
      |                abs
a.cc:14:40: error: 'bf' was not declared in this scope
   14 |         cin >> bs.h >> bs.m >> bs.s >> bf.h >> bf.m >> bf.s;
      |                                        ^~
a.cc:15:16: error: 'cs' was not declared in this scope
   15 |         cin >> cs.h >> cs.m >> cs.s >> cf.h >> cf.m >> cf.s;
      |                ^~
a.cc:15:40: error: 'cf' was not declared in this scope
   15 |         cin >> cs.h >> cs.m >> cs.s >> cf.h >> cf.m >> cf.s;
      |                                        ^~
a.cc:21:13: error: expected ';' before 'retA'
   21 |         time retA;
      |             ^~~~~
      |             ;
a.cc:22:9: error: 'retA' was not declared in this scope
   22 |         retA.h = amin / 3600;
      |         ^~~~
a.cc:25:13: error: expected ';' before 'retB'
   25 |         time retB;
      |             ^~~~~
      |             ;
a.cc:26:9: error: 'retB' was not declared in this scope
   26 |         retB.h = bmin / 3600;
      |         ^~~~
a.cc:29:13: error: expected ';' before 'retC'
   29 |         time retC;
      |             ^~~~~
      |             ;
a.cc:30:9: error: 'retC' was not declared in this scope
   30 |         retC.h = cmin / 3600;
      |         ^~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

class time{
public:
	int h,m,s;
};

int main(){

	time as,af,bs,bf,cs,cf;
	cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
	cin >> bs.h >> bs.m >> bs.s >> bf.h >> bf.m >> bf.s;
	cin >> cs.h >> cs.m >> cs.s >> cf.h >> cf.m >> cf.s;
	
	int amin = (af.h)*60*60 + (af.m)*60 + af.s - ((as.h)*60*60 + (as.m)*60 + as.s);
	int bmin = (bf.h)*60*60 + (bf.m)*60 + bf.s - ((bs.h)*60*60 + (bs.m)*60 + bs.s);
	int cmin = (cf.h)*60*60 + (cf.m)*60 + cf.s - ((cs.h)*60*60 + (cs.m)*60 + cs.s);

	time retA;
	retA.h = amin / 3600;
	retA.m = (amin % 3600) / 60;
	retA.s = (amin % 3600) % 60;
	time retB;
	retB.h = bmin / 3600;
	retB.m = (bmin % 3600) / 60;
	retB.s = (bmin % 3600) % 60;
	time retC;
	retC.h = cmin / 3600;
	retC.m = (cmin % 3600) / 60;
	retC.s = (cmin % 3600) % 60;

	cout << retA.h << " " << retA.m << " " << retA.s << endl;
	cout << retB.h << " " << retB.m << " " << retB.s << endl;
	cout << retC.h << " " << retC.m << " " << retC.s << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before 'as'
   13 |         time as,af,bs,bf,cs,cf;
      |             ^~~
      |             ;
a.cc:14:16: error: 'as' was not declared in this scope; did you mean 'abs'?
   14 |         cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
      |                ^~
      |                abs
a.cc:14:40: error: 'af' was not declared in this scope
   14 |         cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
      |                                        ^~
a.cc:15:16: error: 'bs' was not declared in this scope; did you mean 'abs'?
   15 |         cin >> bs.h >> bs.m >> bs.s >> bf.h >> bf.m >> bf.s;
      |                ^~
      |                abs
a.cc:15:40: error: 'bf' was not declared in this scope
   15 |         cin >> bs.h >> bs.m >> bs.s >> bf.h >> bf.m >> bf.s;
      |                                        ^~
a.cc:16:16: error: 'cs' was not declared in this scope
   16 |         cin >> cs.h >> cs.m >> cs.s >> cf.h >> cf.m >> cf.s;
      |                ^~
a.cc:16:40: error: 'cf' was not declared in this scope
   16 |         cin >> cs.h >> cs.m >> cs.s >> cf.h >> cf.m >> cf.s;
      |                                        ^~
a.cc:22:13: error: expected ';' before 'retA'
   22 |         time retA;
      |             ^~~~~
      |             ;
a.cc:23:9: error: 'retA' was not declared in this scope
   23 |         retA.h = amin / 3600;
      |         ^~~~
a.cc:26:13: error: expected ';' before 'retB'
   26 |         time retB;
      |             ^~~~~
      |             ;
a.cc:27:9: error: 'retB' was not declared in this scope
   27 |         retB.h = bmin / 3600;
      |         ^~~~
a.cc:30:13: error: expected ';' before 'retC'
   30 |         time retC;
      |             ^~~~~
      |             ;
a.cc:31:9: error: 'retC' was not declared in this scope
   31 |         retC.h = cmin / 3600;
      |         ^~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

class time{
public:
	int h,m,s;
};

int main(){

	time as,af,bs,bf,cs,cf;
	cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
	cin >> bs.h >> bs.m >> bs.s >> bf.h >> bf.m >> bf.s;
	cin >> cs.h >> cs.m >> cs.s >> cf.h >> cf.m >> cf.s;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before 'as'
   13 |         time as,af,bs,bf,cs,cf;
      |             ^~~
      |             ;
a.cc:14:16: error: 'as' was not declared in this scope; did you mean 'abs'?
   14 |         cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
      |                ^~
      |                abs
a.cc:14:40: error: 'af' was not declared in this scope
   14 |         cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
      |                                        ^~
a.cc:15:16: error: 'bs' was not declared in this scope; did you mean 'abs'?
   15 |         cin >> bs.h >> bs.m >> bs.s >> bf.h >> bf.m >> bf.s;
      |                ^~
      |                abs
a.cc:15:40: error: 'bf' was not declared in this scope
   15 |         cin >> bs.h >> bs.m >> bs.s >> bf.h >> bf.m >> bf.s;
      |                                        ^~
a.cc:16:16: error: 'cs' was not declared in this scope
   16 |         cin >> cs.h >> cs.m >> cs.s >> cf.h >> cf.m >> cf.s;
      |                ^~
a.cc:16:40: error: 'cf' was not declared in this scope
   16 |         cin >> cs.h >> cs.m >> cs.s >> cf.h >> cf.m >> cf.s;
      |                                        ^~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

class time{
public:
	int h,m,s;
};

int main(){

	time as,af,bs,bf,cs,cf;

	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before 'as'
   13 |         time as,af,bs,bf,cs,cf;
      |             ^~~
      |             ;
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
int a;
int b;
int c;
int d;
int e;
int f;
int g;
int h;
int i;
int j;
g=0;
while(g<3){
cin >>a;
cin >>b;
cin >>c;
cin >>d;
cin >>e;
cin >>f;
if(c>f){f=f+60; e=e-1;}
if(b>e){e=e+60; d=d-1;}
h=d-a;
i=e-b;
j=f-c;
cout <<h<<" "<<i<<" "<<j<<endl;
g=g+1;}

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

#include <cstdio>

int main()
{
for(int i = 0; i < 3; ++i) {
int l[3], r[3];
for(int j = 0; j < 3; ++j)
scanf("%d", l + j);
for(int j = 0; j < 3; ++j)
scanf("%d", r + j);
}
int h, m, s;
s = r[0] - l[0];
if(s < 0) {s += 60; r[1] -= 1; }
m = r[1] - l[1];
if(m < 0) {m += 60; r[2] -= 1; }
h = r[2] - l[2];
printf("%d %d %d\n", h, m, s);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'r' was not declared in this scope
   13 | s = r[0] - l[0];
      |     ^
a.cc:13:12: error: 'l' was not declared in this scope
   13 | s = r[0] - l[0];
      |            ^
a.cc: At global scope:
a.cc:20:1: error: expected unqualified-id before 'return'
   20 | return 0;
      | ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++

#include<iostream>

using namespace std;

struct time{
	int h, m, s;
};

int main(void){

	time s[3],t[3];
	int st,tt,zt;

	for(int i = 0; i < 3; i++){
		cin >> s[i].h >> s[i].m >> s[i].s >> t[i].h >> t[i].m >> t[i].s;
	}

	for (int i = 0; i < 3; i++){
		st = s[i].s + s[i].m * 60 + s[i].h * 60 * 60;
		tt = t[i].s + t[i].m * 60 + t[i].h * 60 * 60;
		zt = tt - st;
		cout << zt / 3600 << " " << (zt % 3600) / 60 << " " << ((zt % 3600) % 60) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: expected ';' before 's'
   11 |         time s[3],t[3];
      |             ^~
      |             ;
a.cc:15:24: error: 's' was not declared in this scope
   15 |                 cin >> s[i].h >> s[i].m >> s[i].s >> t[i].h >> t[i].m >> t[i].s;
      |                        ^
a.cc:15:54: error: 't' was not declared in this scope
   15 |                 cin >> s[i].h >> s[i].m >> s[i].s >> t[i].h >> t[i].m >> t[i].s;
      |                                                      ^
a.cc:19:22: error: 's' was not declared in this scope
   19 |                 st = s[i].s + s[i].m * 60 + s[i].h * 60 * 60;
      |                      ^
a.cc:20:22: error: 't' was not declared in this scope
   20 |                 tt = t[i].s + t[i].m * 60 + t[i].h * 60 * 60;
      |                      ^
Language: C++

#include<iostream>

using namespace std;

typedef struct time{
	int h, m, s;
};

int main(void){

	time s[3],t[3];
	int st,tt,zt;

	for(int i = 0; i < 3; i++){
		cin >> s[i].h >> s[i].m >> s[i].s >> t[i].h >> t[i].m >> t[i].s;
	}

	for (int i = 0; i < 3; i++){
		st = s[i].s + s[i].m * 60 + s[i].h * 60 * 60;
		tt = t[i].s + t[i].m * 60 + t[i].h * 60 * 60;
		zt = tt - st;
		cout << zt / 3600 << " " << (zt % 3600) / 60 << " " << ((zt % 3600) % 60) << endl;
	}
	return 0;
}

Compiler output:
a.cc:5:1: warning: 'typedef' was ignored in this declaration
    5 | typedef struct time{
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:11:13: error: expected ';' before 's'
   11 |         time s[3],t[3];
      |             ^~
      |             ;
a.cc:15:24: error: 's' was not declared in this scope
   15 |                 cin >> s[i].h >> s[i].m >> s[i].s >> t[i].h >> t[i].m >> t[i].s;
      |                        ^
a.cc:15:54: error: 't' was not declared in this scope
   15 |                 cin >> s[i].h >> s[i].m >> s[i].s >> t[i].h >> t[i].m >> t[i].s;
      |                                                      ^
a.cc:19:22: error: 's' was not declared in this scope
   19 |                 st = s[i].s + s[i].m * 60 + s[i].h * 60 * 60;
      |                      ^
a.cc:20:22: error: 't' was not declared in this scope
   20 |                 tt = t[i].s + t[i].m * 60 + t[i].h * 60 * 60;
      |                      ^
Language: C++

#include<iostream>

using namespace std;

typedef struct time{
	int h;
        int m;
        int s;
};

int main(void){

	time s[3],t[3];
	int st,tt,zt;

	for(int i = 0; i < 3; i++){
		cin >> s[i].h >> s[i].m >> s[i].s >> t[i].h >> t[i].m >> t[i].s;
	}

	for (int i = 0; i < 3; i++){
		st = s[i].s + s[i].m * 60 + s[i].h * 60 * 60;
		tt = t[i].s + t[i].m * 60 + t[i].h * 60 * 60;
		zt = tt - st;
		cout << zt / 3600 << " " << (zt % 3600) / 60 << " " << ((zt % 3600) % 60) << endl;
	}
	return 0;
}

Compiler output:
a.cc:5:1: warning: 'typedef' was ignored in this declaration
    5 | typedef struct time{
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before 's'
   13 |         time s[3],t[3];
      |             ^~
      |             ;
a.cc:17:24: error: 's' was not declared in this scope
   17 |                 cin >> s[i].h >> s[i].m >> s[i].s >> t[i].h >> t[i].m >> t[i].s;
      |                        ^
a.cc:17:54: error: 't' was not declared in this scope
   17 |                 cin >> s[i].h >> s[i].m >> s[i].s >> t[i].h >> t[i].m >> t[i].s;
      |                                                      ^
a.cc:21:22: error: 's' was not declared in this scope
   21 |                 st = s[i].s + s[i].m * 60 + s[i].h * 60 * 60;
      |                      ^
a.cc:22:22: error: 't' was not declared in this scope
   22 |                 tt = t[i].s + t[i].m * 60 + t[i].h * 60 * 60;
      |                      ^
Language: C++

//============================================================================
// Name        : timecard.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

int main() {
	int h1,m1,s1; //Aさんの出社時刻
	int h2,m2,s2; //Bさんの退社時刻

	for(int i=0; i<3;i+=1){


		cin >>h1>> m1 >> s1;
		cin >>h2>> m2 >> s2;

		int h=h2-h1;
		int m=m2-m1;
		int s=s2-s1;


		int k =0;
		if(s<0){
			k=1;
			s= s+ 60;
		}
		m =m2-m1-k;
		k=0;
		if(m<0){
			k=1;
			m= m+ 60;
		}
		h =h2-h1-k;
		k=0;


		cout <<h<<" "<< m<<" " <<s<<endl;

	}



	return 0;

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

import java.util.Scanner;

class Main {

	public static void main(String args[]){
		Scanner in = new Scanner(System.in);
		int w=0, k=0;
		int ws[] = new int[10], ks[] = new int[10];
		for(int i=0; i<10; i++)
                   ws[i] = in.nextInt();
		for(int i=0; i<10; i++)
                   ks[i] = in.nextInt();
		Arrays.sort(ks);
		Arrays.sort(ws);
		for(int i=0; i<3; i++)
                  w += ws[9-i];
		for(int i=0; i<3; i++)
                  k += ks[9-i];
		System.out.println(w + " " + k);
	}
	
}

Compiler output:
Main.java:13: error: cannot find symbol
		Arrays.sort(ks);
		^
  symbol:   variable Arrays
  location: class Main
Main.java:14: error: cannot find symbol
		Arrays.sort(ws);
		^
  symbol:   variable Arrays
  location: class Main
2 errors
Language: C

#include<stdio.h>
int main(void)
{
	int w[10],k[10],l,maxw=0,maxk=0,q,m,p,i;
	for(l=0;l<10;l++){
		scanf("%d",&w[l]);
}
for(l=0;l<10;l++){
		for(p=l+1;p<10;p++){
			if(w[l]<w[p]){
				q=w[p];
				w[p]=w[l];
				w[l]=q;
			}
		}
	}
	for (l=0;l<10;l++){
		scanf("%d",&k[l]);
}
for (l=0;l<10;l++){
		for(p=l+1;p<10;p++){
		if(k[l]<k[p]){
			m=k[p];
			k[p]=k[l];
			k[l]=m;
			}			
		}
	}
	for(i=0;i<3;i++){
		maxw=maxw+w[i];
		maxk=maxk+k[i];
	}
	printf("%d %d\n",maxw,maxk);
	return 0;



Compiler output:
main.c: In function 'main':
main.c:34:9: error: expected declaration or statement at end of input
   34 |         return 0;
      |         ^~~~~~
Language: C

#include <stdio.h>

#define swap(a, b) {int tmp = a; a = b; b = tmp;}

int main(void)
{
	int w[10];
	int k[10];
	int max[3] = {0};
	int i, j, k;
	
	for (i = 0; i < 10; i++){
		scanf("%d", w + i);
	}
	for (i = 0; i < 9; i++){
		for (j = 0; j < 9 - i; j++){
			if (w[j] > w[j + 1]){
				swap(w[j], w[j + 1]);
			}
		}
	}
	
	for (i = 0; i < 10; i++){
		scanf("%d", k + i);
	}
	for (i = 0; i < 9; i++){
		for (j = 0; j < 9 - i; j++){
			if (k[j] > k[j + 1]){
				swap(k[j], k[j + 1]);
			}
		}
	}
	
	printf("%d %d", w[0] + w[1] + w[2], k[0] + k[1] + k[2]);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:19: error: conflicting types for 'k'; have 'int'
   10 |         int i, j, k;
      |                   ^
main.c:8:13: note: previous declaration of 'k' with type 'int[10]'
    8 |         int k[10];
      |             ^
Language: C

#include<stdio.h>

int main(void)
{
int i,a,max1=0,max2=0,max3=0;
int k,w;

for(i=0;i<10;i++){
scanf("%d",&a);
if(max1<a){
max3=max2;
max2=max1;
max1=a;
}else if(max2<a){
max3=max2;
max2=a;
}else if(max3<a){
max3=a;
}
w=w+max2+max1+max3;

max1=0;
max2=0;
max3=0;

for(i=0;i<10;i++){
scanf("%d",&a);
if(max1<a){
max3=max2;
max2=max1;
max1=a;
}else if(max2<a){
max3=max2;
max2=a;
}else if(max3<a){
max3=a;
}
k=w+max2+max1+max3;

printf("%d %d",w,k);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:42:1: error: expected declaration or statement at end of input
   42 | }
      | ^
main.c:42:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
int main(){
int w[10],k[10],i=0,n,pre,wsum,ksum;
for(i=0;i<20;i++){
scanf("%d\n",&w[i]);
}
for(i=0;i<20;i++){
scanf("%d\n",&k[i]);
}
for(n=9;n>1;n--){
for(i=0;i<n;i++){
if(w[n-i]<w[n-i-1]){
w[n-i]=pre;
w[n-i]=w[n-i-1];
w[n-i-1]=pre;
}
}

for(n=9;n>1;n--){
for(i=0;i<n;i++){
if(k[n-i]<k[n-i-1]){
k[n-i]=pre;
k[n-i]=k[n-i-1];
k[n-i-1]=pre;
}
}
wsum = w[0]+w[1]+w[2];
ksum = k[0]+k[1]+k[2];
printf("%d %d\n",wsum,ksum);

}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:33:1: error: expected declaration or statement at end of input
   33 | }
      | ^
Language: C

#include<stdio.h>
int main(){
int w[10],k[10],i,n,pre,wsum,ksum;
for(i=0;i<10;i++){
scanf("%d\n",&w[i]);
}
for(i=0;i<10;i++){
scanf("%d\n",&k[i]);
}
for(n=9;n>1;n--){
for(i=0;i<n;i++){
if(w[n-i]<w[n-i-1]){
w[n-i]=pre;
w[n-i]=w[n-i-1];
w[n-i-1]=pre;
}
}

for(n=9;n>1;n--){
for(i=0;i<n;i++){
if(k[n-i]<k[n-i-1]){
k[n-i]=pre;
k[n-i]=k[n-i-1];
k[n-i-1]=pre;
}
}
wsum = w[0]+w[1]+w[2];
ksum = k[0]+k[1]+k[2];
printf("%d %d\n",wsum,ksum);

}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:33:1: error: expected declaration or statement at end of input
   33 | }
      | ^
Language: C

#include<stdio.h>
int main(){
int w[10],k[10],i,n,pre,wsum,ksum;
for(i=0;i<10;i++){
scanf("%d\n",&w[i]);
}
for(i=0;i<10;i++){
scanf("%d\n",&k[i]);
}
for(n=9;n>1;n--){
for(i=0;i<n;i++){
if(w[n-i]<w[n-i-1]){
pre=w[n-i];
w[n-i]=w[n-i-1];
w[n-i-1]=pre;
}
}

for(n=9;n>1;n--){
for(i=0;i<n;i++){
if(k[n-i]<k[n-i-1]){
pre=k[n-i];
k[n-i]=k[n-i-1];
k[n-i-1]=pre;
}
}
wsum = w[0]+w[1]+w[2];
ksum = k[0]+k[1]+k[2];
printf("%d %d\n",wsum,ksum);

}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:33:1: error: expected declaration or statement at end of input
   33 | }
      | ^
Language: C

#include<stdio.h>
int main(){
int w[10],k[10],i,n,pre,wsum,ksum;
for(i=0;i<10;i++){
scanf("%d\n",&w[i]);
}
for(i=0;i<10;i++){
scanf("%d\n",&k[i]);
}
for(n=9;n>1;n--){
for(i=0;i<n;i++){
if(w[n-i]<w[n-i-1]){
pre=w[n-i];
w[n-i]=w[n-i-1];
w[n-i-1]=pre;
}
}

for(n=9;n>1;n--){
for(i=0;i<n;i++){
if(k[n-i]<k[n-i-1]){
pre=k[n-i];
k[n-i]=k[n-i-1];
k[n-i-1]=pre;
}
}
wsum = w[0]+w[1]+w[2];
ksum = k[0]+k[1]+k[2];
printf("%d %d\n",wsum,ksum);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:32:1: error: expected declaration or statement at end of input
   32 | }
      | ^
main.c:32:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
int main(){
int w[10],k[10],i,j,tmp,ksum,wsum;
for(i=0;i<10;i++){
scanf("%d\n",&w[i]);
}
for(i=0;i<10;i++){
scanf("%d\n",&k[i]);
}
for (i = 0; i < n - 1; i++) {
for (j = n - 1; j > i; j--) {
if (w[j - 1] < w[j]) { 
tmp = w[j];      
w[j] = w[j - 1];
w[j - 1]= tmp;
}
if (k[j - 1] < k[j]) {  
tmp = k[j];      
k[j] = k[j - 1];
k[j - 1]= tmp;
}
}
}
wsum=w[0]+w[1]+w[2];
ksum=k[0]+k[1]+k[2];
printf("%d %d\n",wsum,ksum);
return 0;
}

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

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

int compare_int(const void *a,const void *b){
	return *(int*)a - *(int*)b;
}

int main(void){
	int w[10];
	int k[10];
	int sum_w,sum_k;
	int i;
	for(i = 0;i < 10;i++){
		scanf("%d",&w[i]);
	}
	for(i = 0;i < 10;i++){
		scanf("%d",&k[i]);
	}
	qsort(w,10,sizeof(int),compare_int);
	qsort(k,10.sizeof(int),compare_int);
	sum_w = w[9] + w[8] + w[7];
	sum_k = k[9] + k[8] + k[7];
	printf("%d %d\n",sum_w,sum_k);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:17: error: invalid suffix "sizeof" on floating constant
   20 |         qsort(k,10.sizeof(int),compare_int);
      |                 ^~~~~~~~~
main.c:20:27: error: expected expression before 'int'
   20 |         qsort(k,10.sizeof(int),compare_int);
      |                           ^~~
main.c:20:32: error: passing argument 3 of 'qsort' makes integer from pointer without a cast [-Wint-conversion]
   20 |         qsort(k,10.sizeof(int),compare_int);
      |                                ^~~~~~~~~~~
      |                                |
      |                                int (*)(const void *, const void *)
In file included from main.c:2:
/usr/include/stdlib.h:970:57: note: expected 'size_t' {aka 'long unsigned int'} but argument is of type 'int (*)(const void *, const void *)'
  970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
      |                                                  ~~~~~~~^~~~~~
main.c:20:9: error: too few arguments to function 'qsort'
   20 |         qsort(k,10.sizeof(int),compare_int);
      |         ^~~~~
/usr/include/stdlib.h:970:13: note: declared here
  970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
      |             ^~~~~
Language: C

ww#include <stdio.h>
int main(){
  int i,j,ws[10],ks[10],koukan;


  for(i=0;i<10;i++){
    scanf("%d",&ws[i]);
  }
  for(i=0;i<10;i++){
    scanf("%d",&ks[i]);
  }

  for(i=0;i<10;i++){
    for(j=0;j<10;j++){
      if(j==9)break;
      if(ws[j]>ws[j+1]){
	koukan=ws[j];
	ws[j]=ws[j+1];
	ws[j+1]=koukan;
      }
      if(ks[j]>ks[j+1]){
	koukan=ks[j];
	ks[j]=ks[j+1];
	ks[j+1]=koukan;
      }

    }
  }
  printf("%d %d\n",ws[7]+ws[8]+ws[9],ks[7]+ks[8]+ks[9]);
  return 0;
}

Compiler output:
main.c:1:3: error: stray '#' in program
    1 | ww#include <stdio.h>
      |   ^
main.c:1:1: error: unknown type name 'ww'
    1 | ww#include <stdio.h>
      | ^~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | ww#include <stdio.h>
      |            ^
Language: C

#include <stdio.h>

int max(int data[]){
  int i,mm=0;
  for(i=0,i<10,i++){
    if(data[mm]<data[i]) mm=i;
  }
  return mm;
}

main(){
  int a[10],b[10],j,k,x,y,amax[3],bmax[3],aa=0,bb=0;
 
 for(j=0,j<10,j++){
    scanf("%d",&a[j]);
  }
  for(k=0,k<10,k++){
    scanf("%d",&b[k]);
  }

  for(x=0,x<3,x++){
    aa=max(a);
    amax[x]=a[aa];
    a[aa]=0;
  }
  for(y=0,y<3,y++){
    bb=max(b);
    bmax[y]=b[bb];
    b[bb]=0;
  }

  printf("%d %d\n",amax[0]+amax[1]+amax[2],bmax[0]+bmax[1]+bmax[2]);

return 0; 
}

Compiler output:
main.c: In function 'max':
main.c:5:19: error: expected ';' before ')' token
    5 |   for(i=0,i<10,i++){
      |                   ^
      |                   ;
main.c:5:19: error: expected expression before ')' token
main.c: At top level:
main.c:11:1: error: return type defaults to 'int' [-Wimplicit-int]
   11 | main(){
      | ^~~~
main.c: In function 'main':
main.c:14:18: error: expected ';' before ')' token
   14 |  for(j=0,j<10,j++){
      |                  ^
      |                  ;
main.c:14:18: error: expected expression before ')' token
main.c:17:19: error: expected ';' before ')' token
   17 |   for(k=0,k<10,k++){
      |                   ^
      |                   ;
main.c:17:19: error: expected expression before ')' token
main.c:21:18: error: expected ';' before ')' token
   21 |   for(x=0,x<3,x++){
      |                  ^
      |                  ;
main.c:21:18: error: expected expression before ')' token
main.c:26:18: error: expected ';' before ')' token
   26 |   for(y=0,y<3,y++){
      |                  ^
      |                  ;
main.c:26:18: error: expected expression before ')' token
Language: C

#include <stdio.h>

int max(int data[],int n){
  int i,mm=0;
  for(i=0,i<n,i++){
    if(data[mm]<data[i]) mm=i;
  }
  return mm;
}

main(){
 int a[10],b[10],j,k,x,y,amax[3],bmax[3],aa=0,bb=0;
 
 for(j=0,j<10,j++){
    scanf("%d",&a[j]);
  }
 for(k=0,k<10,k++){
    scanf("%d",&b[k]);
  }

 for(x=0,x<3,x++){
    aa=max(a,10);
    amax[x]=a[aa];
    a[aa]=0;
  }
 for(y=0,y<3,y++){
    bb=max(b,10);
    bmax[y]=b[bb];
    b[bb]=0;
  }

 printf("%d %d\n",amax[0]+amax[1]+amax[2],bmax[0]+bmax[1]+bmax[2]);

return 0; 
}

Compiler output:
main.c: In function 'max':
main.c:5:18: error: expected ';' before ')' token
    5 |   for(i=0,i<n,i++){
      |                  ^
      |                  ;
main.c:5:18: error: expected expression before ')' token
main.c: At top level:
main.c:11:1: error: return type defaults to 'int' [-Wimplicit-int]
   11 | main(){
      | ^~~~
main.c: In function 'main':
main.c:14:18: error: expected ';' before ')' token
   14 |  for(j=0,j<10,j++){
      |                  ^
      |                  ;
main.c:14:18: error: expected expression before ')' token
main.c:17:18: error: expected ';' before ')' token
   17 |  for(k=0,k<10,k++){
      |                  ^
      |                  ;
main.c:17:18: error: expected expression before ')' token
main.c:21:17: error: expected ';' before ')' token
   21 |  for(x=0,x<3,x++){
      |                 ^
      |                 ;
main.c:21:17: error: expected expression before ')' token
main.c:26:17: error: expected ';' before ')' token
   26 |  for(y=0,y<3,y++){
      |                 ^
      |                 ;
main.c:26:17: error: expected expression before ')' token
Language: C

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

int main(void) {
	int w[10],k[10];
	int i,j,p,q,t,s;
	int wsum=0,ksum=0,swap;
	for(i=0;i<10;i++) {
		scanf("%d\n",&w[i]);
	}
	for(t=0;t<10;t++){
		for(j=0;j<10;j++){
			if (w[j]>w[j+1]) {
				swap=w[j];
				w[j]=w[j+1];
				w[j+1]=swap;
			}
		}
	}
	wsum=w[9]+w[8]+w[7];
	for(p=0;p<10;p++){
		scanf("%d\n",&k[p]);
	}
	for(s=0;s<10;s++){
		for(q=0;q<10;q++){
			if (k[q]>k[q+1]) {
				swap=k[q];
				k[q]=k[q+1];
				k[q+1]=swap;
			}
		}
	}

		ksum=k[9]+k[8]+k[7];
		printf("%d %d\n",wsum,ksum);
		fclose(fpout);
		return EXIT_SUCCESS;
	}

Compiler output:
main.c: In function 'main':
main.c:36:24: error: 'fpout' undeclared (first use in this function)
   36 |                 fclose(fpout);
      |                        ^~~~~
main.c:36:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<functional>
#include<algorithm>
using namespace std;
int main()
{
	int i, a[11], b[11],x=0,y=0;
	for (i = 0; i < 10; i++){
		scanf("%d", &a[i]);
	}
	for (i = 0; i < 10; i++){
		scanf("%d", &b[i]);
	}
	sort(a, a + 10, greater<int>());
	sort(b, b + 10, greater<int>());
	for (i = 0; i <= 2; i++){
		x += a[i];
		y += b[i];
	}
	printf("%d %d\n", x, y);
	return 0;
}

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

int main(){
int set[20];
int ans1[10],ans2[10];
int i,j,temp1,temp2;
for(i=0;i<20;i++){
scanf("%d",&set[i]);
}
for(i=0;i<10;i++){
ans1[i]=set[i];
}
for(i=0;i<10;i++){
ans2[i]=set[10+i];
}
temp1=0,temp2=0
for(i=0;i<10;i++){
for(j=0;j<10;j++){
if(ans1[j]>ans1[i]){
ans1[j]=temp1;
ans1[j]=ans1[i];
ans1[i]=temp1;
}
if(ans2[j]>ans2[i]){
ans2[j]=temp2;
ans2[j]=ans2[i];
ans2[i]=temp2;
}
}
}
printf("%d %d",(ans1[0]+ans1[1]+ans1[2]),(ans2[0]+ans2[1]+ans2[2]));
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 | scanf("%d",&set[i]);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:6:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 | scanf("%d",&set[i]);
      | ^~~~~
main.c:6:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:16: error: expected ';' before 'for'
   14 | temp1=0,temp2=0
      |                ^
      |                ;
   15 | for(i=0;i<10;i++){
      | ~~~
Language: C

#include <stdio.h>
int main(){
int dataarray[20];
int i,j,answer1,answer2,temp;
for(i=0;i<20;i++){
scanf("%d",&dataarray[i]);
}
for(i=0;i<10;i++){
for(j=i;j<10;j++){
if(dataarray[j]>dataarray[i]{
temp=dataarray[j];
dataarray[j]=dataarray[i];
dataarray[i]=temp;
}
if(dataarray[j+10]>dataarray[i+10]{
temp=dataarray[j+10];
dataarray[j+10]=dataarray[i+10];
dataarray[i+10]=temp;
}
}
answer1=dataarray[0]+dataarray[1]+dataarray[2];
answer2=dataarray[10]+dataarray[11]+dataarray[12];
printf("%d %d",answer1,answer2);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:29: error: expected ')' before '{' token
   10 | if(dataarray[j]>dataarray[i]{
      |   ~                         ^
      |                             )
main.c:25:1: error: expected expression before '}' token
   25 | }
      | ^
main.c:25:1: error: expected declaration or statement at end of input
main.c:25:1: error: expected declaration or statement at end of input
Language: C++

#include<iostream>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(){
	int ws=0,ks=0;
	int data;
	rep(i,10){cin>>data;ws+=data};
	rep(i,10){cin>>data;ks+=data);
	cout<< ws << " " <<ks << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:37: error: expected ';' before '}' token
    9 |         rep(i,10){cin>>data;ws+=data};
      |                                     ^
      |                                     ;
a.cc:10:37: error: expected ';' before ')' token
   10 |         rep(i,10){cin>>data;ks+=data);
      |                                     ^
      |                                     ;
a.cc:12:2: error: expected '}' at end of input
   12 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a[10],b[10];
  for(int i=0;i<10;i++){
    cin>>a[i];
  }
  for(int i=0;i<10;i++){
    cin>>b[i];
  }
  sort(a,a+10);
  sort(b,b+10);
  cout << a[8]+a[9]+a[7] << endl;
  cout << b[8]+b[9]+b[7] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 |   sort(a,a+10);
      |   ^~~~
      |   short
Language: C++

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

int main () {
    int m, W[10], T[i], i;
    for(i=0;i<10;i++) {
        cin >> W[i];
        m = max(m,W[i]);
    }
    cout << m << " ";
    for(i=0;i<10;i++) {
        cin >> T[i];
        m=max(m,T[i]);
    }
    cout << m << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: 'i' was not declared in this scope
    6 |     int m, W[10], T[i], i;
      |                     ^
a.cc:13:16: error: 'T' was not declared in this scope
   13 |         cin >> T[i];
      |                ^
Language: C++

#include<iostream>
using namespace std;

int main(){
int N[11]={},W[11]={},x;
int Ns=0;Ws=0;
for(int i=0;i<9;i++)
{cin>>x;N[i]=x;}
for(int i=0;i<9;i++)
{cin>>x;W[i]=x;}
for(int i=0;i<9;i++)
{for(int j=9;j>j;j--)
{if(N[j]>N[j-1]){int t=N[j];N[j]=N[j-1];N[j-1]=t;}
 if(W[j]>W[j-1]){int t=W[j];W[j]=W[j-1];W[j-1]=t;}
}
}
for(int i=0;i<3;i++)
{Ns+=N[i];Ws+=W[i];}
cout<<Ns<<" "<<Ws<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'Ws' was not declared in this scope; did you mean 'Ns'?
    6 | int Ns=0;Ws=0;
      |          ^~
      |          Ns