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

#include<iostream>
using namespace std;
int main()
{
int a，b，h;
cin>>a,b,h;
cout<<''s=''<<(a+b)*h/2.0<<endl;
return 0;
}

Compiler output:
a.cc:7:7: error: empty character constant
    7 | cout<<''s=''<<(a+b)*h/2.0<<endl;
      |       ^~~
a.cc:7:11: error: empty character constant
    7 | cout<<''s=''<<(a+b)*h/2.0<<endl;
      |           ^~
a.cc: In function 'int main()':
a.cc:6:6: error: 'a' was not declared in this scope
    6 | cin>>a,b,h;
      |      ^
a.cc:6:8: error: 'b' was not declared in this scope
    6 | cin>>a,b,h;
      |        ^
a.cc:6:10: error: 'h' was not declared in this scope
    6 | cin>>a,b,h;
      |          ^
a.cc:7:7: error: unable to find character literal operator 'operator""s' with 'char' argument
    7 | cout<<''s=''<<(a+b)*h/2.0<<endl;
      |       ^~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
int a，b，h;
cin>>a,b,h;
cout<<s=<<(a+b)*h/2.0<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: 'a' was not declared in this scope
    6 | cin>>a,b,h;
      |      ^
a.cc:6:8: error: 'b' was not declared in this scope
    6 | cin>>a,b,h;
      |        ^
a.cc:6:10: error: 'h' was not declared in this scope
    6 | cin>>a,b,h;
      |          ^
a.cc:7:7: error: 's' was not declared in this scope
    7 | cout<<s=<<(a+b)*h/2.0<<endl;
      |       ^
a.cc:7:9: error: expected primary-expression before '<<' token
    7 | cout<<s=<<(a+b)*h/2.0<<endl;
      |         ^~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:2:69: error: expected ';' before '}' token
    2 | int main(){int a,b,c;scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*c/2)}
      |                                                                     ^
      |                                                                     ;
Language: C

#include <stdio.h>

int main(void)
{
int a,b,h;

scnaf("%d%d%d",&a,&b,&h);

printf("%d",(a+b)*h/2);

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:1: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 | scnaf("%d%d%d",&a,&b,&h);
      | ^~~~~
      | scanf
Language: C++

#include <iostream>
#include <string>
#include <string.h>
using namespace std;
int main() {
 
    int a,b,c,d,e,f;
    
    cin >>  a >> b >> c;
    d = a+b;
   
    cout << d*c/2 << endl;
    
    
	return 0;
}
#include <iostream>
#include <string>
#include <string.h>
using namespace std;
int main() {
 
    int a,b,c,d,e,f;
    
    cin >>  a >> b >> c;
    d = a+b;
   
    cout << d*c/2 << endl;
    
 
	return 0;
}

Compiler output:
a.cc:21:5: error: redefinition of 'int main()'
   21 | int main() {
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main() {
      |     ^~~~
Language: C++

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

int main()
{
  int a, s, d,;
  cin >> a >> s >> d ;
  
  cout << (a+s)*d/2<< endl;
  

}  


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected unqualified-id before ';' token
    6 |   int a, s, d,;
      |               ^
Language: C++

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

int main()
{
  int a, s, d,;
  cin >> a >> s >> d ;
  
  cout << (a+s)*h/2<< endl;
  

}  


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected unqualified-id before ';' token
    6 |   int a, s, d,;
      |               ^
a.cc:9:17: error: 'h' was not declared in this scope
    9 |   cout << (a+s)*h/2<< endl;
      |                 ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a, b, h;	cin >> a >> b >> h;
  cout << (a+b)*h/2 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:5:29: error: expected '}' at end of input
    5 |   cout << (a+b)*h/2 << endl;
      |                             ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <stdio.h>

int main(void)
{
   int a,b,h;
   int s;

   scanf("%d", &a);
    scanf("%d", &b);
    scanf("%d", &h);

   s =(a + b)*h/2;
   printf("s = %d\n", s);
   return 0;
}



~              

Compiler output:
a.cc:19:2: error: expected class-name at end of input
   19 | ~
      |  ^
Language: C++

#include <stdio.h>

int main(void)
{
   int a,b,h;
   int s;

   printf("a="); scanf("%d", &a);
   printf("b="); scanf("%d", &b);
   printf("h="); scanf("%d", &h);

   s =(a + b)*h/2;
   printf("s = %d\n", s);
   return 0;
}



~              

Compiler output:
a.cc:19:2: error: expected class-name at end of input
   19 | ~
      |  ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();
	int h = sc.nextInt();
	System.out.println((a+b)*h/2);
}
	


Compiler output:
Main.java:9: error: reached end of file while parsing
}
 ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
double a, b, h;

int main(){
  cin>>a>>b>>c;
  cout<<(a+b)*h/2<<endl;
}

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

#include <bits/stdc++.h>
using namespace std;
int a, b, h;

int main(){
  cin>>a>>b>>c;
  cout<<(a+b-1)*h/2+1<<endl;
}

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

#include <cstdio>

using std::cin;
using std::cout;
using std::endl;

using namespace std;

int main() {
  int a, b, h;

  cin >> a >> b >> h;

  cout << (a + b) * 2 / 2 << endl;
}


Compiler output:
a.cc:3:12: error: 'cin' has not been declared in 'std'
    3 | using std::cin;
      |            ^~~
a.cc:4:12: error: 'cout' has not been declared in 'std'
    4 | using std::cout;
      |            ^~~~
a.cc:5:12: error: 'endl' has not been declared in 'std'
    5 | using std::endl;
      |            ^~~~
a.cc: In function 'int main()':
a.cc:12:3: error: 'cin' was not declared in this scope
   12 |   cin >> a >> b >> h;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cstdio>
  +++ |+#include <iostream>
    2 | 
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << (a + b) * 2 / 2 << endl;
      |   ^~~~
a.cc:14:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:30: error: 'endl' was not declared in this scope
   14 |   cout << (a + b) * 2 / 2 << endl;
      |                              ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <cstdio>
  +++ |+#include <ostream>
    2 |
Language: Java

import java.util.*;


public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
int a=integer.parseInt(line);
line = sc.nextLine();
int b=integer.parseInt(line);
line = sc.nextLine();
int h=integer.parseInt(line);
        System.out.println((a+b)*h/2);
    }
}

Compiler output:
Main.java:11: error: cannot find symbol
int a=integer.parseInt(line);
      ^
  symbol:   variable integer
  location: class Main
Main.java:13: error: cannot find symbol
int b=integer.parseInt(line);
      ^
  symbol:   variable integer
  location: class Main
Main.java:15: error: cannot find symbol
int h=integer.parseInt(line);
      ^
  symbol:   variable integer
  location: class Main
3 errors
Language: C++

#include <bits/stdc++.h>
#include <typeinfo>
#include <cxxabi.h>
#ifdef LOCAL
  #include "dbgtoki.hpp"
  #define DUMP(i) dump((string)TOSTRING(i), demangle(typeid(i).name()), __LINE__ , i) 
DbgTimer D_t;
  #define TSTART() D_t.start()
  #define TSTOP() D_t.stop()
#else
  #define DUMP(i) 
  #define TSTART()
  #define TSTOP()  
#endif
 
#define TOSTRING(x) #x
#define SZ(x) (int)(x).size()
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(s) (s).begin(), (s).end()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()) , v.end());
using namespace std;
typedef long long unsigned int llu;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;

const int EPS = 1e-9;



int main (){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a,b,c;
  while(cin >> a >> b >> h){
    TSTART();
    int ans = (a+b)*h/2;
    cout << ans << endl;
    TSTOP();
  }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:36:26: error: 'h' was not declared in this scope
   36 |   while(cin >> a >> b >> h){
      |                          ^
Language: C++

#include<iostream>
using namespace std;

int main(void) {
  int a, b, c;
  cin >> a >> b >> c;
  
  cout << (a+b)*h/(double)(2) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'h' was not declared in this scope
    8 |   cout << (a+b)*h/(double)(2) << endl;
      |                 ^
Language: C++

#include<iostream>
using namespace std;

int main(void) {
  int a, b, c;
  cin >> a >> b >> c;
  
  cout << (a+b)*h/double(2) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'h' was not declared in this scope
    8 |   cout << (a+b)*h/double(2) << endl;
      |                 ^
Language: C++


a=int(input())
b=int(input())
h=int(input())
print((a+b)*h//2)
#inputはstrに対応
#勝手に改行

Compiler output:
a.cc:6:2: error: invalid preprocessing directive #input\U0000306fstr\U0000306b\U00005bfe\U00005fdc
    6 | #inputはstrに対応
      |  ^~~~~~~~~~~~~~~~
a.cc:7:2: error: invalid preprocessing directive #\U000052dd\U0000624b\U0000306b\U00006539\U0000884c
    7 | #勝手に改行
      |  ^~~~~~~~~~
a.cc:2:1: error: 'a' does not name a type
    2 | a=int(input())
      | ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int a, b h;
	cin >> a >> b >> h;
	cout<< (a+b)*h/2<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:18: error: expected initializer before 'h'
    5 |         int a, b h;
      |                  ^
a.cc:6:21: error: 'b' was not declared in this scope
    6 |         cin >> a >> b >> h;
      |                     ^
a.cc:6:26: error: 'h' was not declared in this scope
    6 |         cin >> a >> b >> h;
      |                          ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int a, b ,h,;
	cin >> a >> b >> h;
	cout<< (a+b)*h/2<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:21: error: expected unqualified-id before ';' token
    5 |         int a, b ,h,;
      |                     ^
Language: C++

#include s/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  
  cout<<(a+b)/2*c<<endl;
}

Compiler output:
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include s/stdc++.h>
      |          ^
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>a>>b>>c;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include s/stdc++.h>
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout<<(a+b)/2*c<<endl;
      |   ^~~~
a.cc:7:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:20: error: 'endl' was not declared in this scope
    7 |   cout<<(a+b)/2*c<<endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include s/stdc++.h>
Language: C++

#include <iostream>

#include <map>

using namespace std;
typedef long long ll;



int main(){
	ll i,j,k;
	ll a,b,c;
	ll h,w,n;
	cin>>h>>w>>n;
	map<pair<int,int>,int> cnt;
	for(i=0;i<n;i++){
		cin>>a>>b;
		for(j=-1;j<=1;j++){
			for(k=-1;k<=1;k++){
				if(a+j>=1 && a+j<=h && b+k>=1 && b+j<=w){
					cnt[make_pair(a+j,b+k)]++;
				}
			}
		}
	}
	ll ans[10];
	fill(a,a+10,0);
	ans[0]=(h-2)*(w-2);
	for(auto& elem : cnt){
		ans[0]--;
		ans[elem.second]++;
	}
	for(i=0;i<=9;i++){
		cout<<ans[i]<<endl;
	}
	return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type std::__fill_a1(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int; _Tp = int; typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type = void]':
/usr/include/c++/14/bits/stl_algobase.h:998:21:   required from 'void std::__fill_a(_FIte, _FIte, const _Tp&) [with _FIte = long long int; _Tp = int]'
  998 |     { std::__fill_a1(__first, __last, __value); }
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:1029:20:   required from 'void std::fill(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int; _Tp = int]'
 1029 |       std::__fill_a(__first, __last, __value);
      |       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:27:6:   required from here
   27 |         fill(a,a+10,0);
      |         ~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:952:9: error: invalid type argument of unary '*' (have 'long long int')
  952 |         *__first = __tmp;
      |         ^~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b,h;
  cin >> a >> b >> h;
  cout << (a+b)*h/2

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected ';' before 'return'
    7 |   cout << (a+b)*h/2
      |                    ^
      |                    ;
    8 | 
    9 |   return 0;
      |   ~~~~~~
Language: C++

process.stdin.resume();
process.stdin.setEncoding('ascii');

var input_stdin = "";
var input_stdin_array = "";
var input_currentline = 0;

process.stdin.on('data', function (data) {
    input_stdin += data;
});

process.on('SIGINT', function(){
    input_stdin_array = input_stdin.split("\n");
    main();
    process.exit();
});

process.stdin.on('end', function () {
    input_stdin_array = input_stdin.split("\n");
    main();    
});

function readLine() {
    return input_stdin_array[input_currentline++];
}

/////////////// ignore above this line ////////////////////


function main() {
	var b1,b2,h;
	b1 = parseInt(readLine());
	b2 = parseInt(readLine());
	h = parseInt(readLine())/2;
    var ans = (b1+b2)*h;
	
	console.log(ans.toString()); 
    process.exit();
}

Compiler output:
a.cc:2:27: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    2 | process.stdin.setEncoding('ascii');
      |                           ^~~~~~~
a.cc:8:18: warning: multi-character character constant [-Wmultichar]
    8 | process.stdin.on('data', function (data) {
      |                  ^~~~~~
a.cc:12:12: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   12 | process.on('SIGINT', function(){
      |            ^~~~~~~~
a.cc:18:18: warning: multi-character character constant [-Wmultichar]
   18 | process.stdin.on('end', function () {
      |                  ^~~~~
a.cc:1:1: error: 'process' does not name a type
    1 | process.stdin.resume();
      | ^~~~~~~
a.cc:2:1: error: 'process' does not name a type
    2 | process.stdin.setEncoding('ascii');
      | ^~~~~~~
a.cc:4:1: error: 'var' does not name a type
    4 | var input_stdin = "";
      | ^~~
a.cc:5:1: error: 'var' does not name a type
    5 | var input_stdin_array = "";
      | ^~~
a.cc:6:1: error: 'var' does not name a type
    6 | var input_currentline = 0;
      | ^~~
a.cc:8:1: error: 'process' does not name a type
    8 | process.stdin.on('data', function (data) {
      | ^~~~~~~
a.cc:10:2: error: expected unqualified-id before ')' token
   10 | });
      |  ^
a.cc:12:1: error: 'process' does not name a type
   12 | process.on('SIGINT', function(){
      | ^~~~~~~
a.cc:16:2: error: expected unqualified-id before ')' token
   16 | });
      |  ^
a.cc:18:1: error: 'process' does not name a type
   18 | process.stdin.on('end', function () {
      | ^~~~~~~
a.cc:21:2: error: expected unqualified-id before ')' token
   21 | });
      |  ^
a.cc:23:1: error: 'function' does not name a type; did you mean 'union'?
   23 | function readLine() {
      | ^~~~~~~~
      | union
a.cc:30:1: error: 'function' does not name a type; did you mean 'union'?
   30 | function main() {
      | ^~~~~~~~
      | union
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:27: error: 'a' was not declared in this scope
    3 |         scanf("%d %d %d",&a,&b,&c);
      |                           ^
a.cc:3:30: error: 'b' was not declared in this scope
    3 |         scanf("%d %d %d",&a,&b,&c);
      |                              ^
a.cc:3:33: error: 'c' was not declared in this scope
    3 |         scanf("%d %d %d",&a,&b,&c);
      |                                 ^
a.cc:4:9: error: 'd' was not declared in this scope
    4 |         d=((a+b)*h)/2;
      |         ^
a.cc:4:18: error: 'h' was not declared in this scope
    4 |         d=((a+b)*h)/2;
      |                  ^
a.cc:6:17: error: expected ';' before '}' token
    6 |         return 0
      |                 ^
      |                 ;
    7 | }
      | ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:25: error: 'c' undeclared (first use in this function)
    4 |   scanf("%d%d%d",&a,&b,&c);
      |                         ^
main.c:4:25: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<math.h>
#include<string>
#include<algorithm>
using namespace std;

#define rep0(n) for(int i=0;i<n;i++)
#define rep(n) for(int i=1;i<=n;i++)

double const pi=3.1415926535;

int printint(int n){
	cout<<n<<endl;
	return 0;
}

int prints(string s){
	cout<<s<<endl;
	return 0;
}

int cinint(string s){
	int s;
	cin>>s;
	return n;
}

int main(){
	
	cout<<(cinint(a)+cinint(b))*cinint(h)/2<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int cinint(std::string)':
a.cc:23:13: error: declaration of 'int s' shadows a parameter
   23 |         int s;
      |             ^
a.cc:22:19: note: 'std::string s' previously declared here
   22 | int cinint(string s){
      |            ~~~~~~~^
a.cc:25:16: error: 'n' was not declared in this scope
   25 |         return n;
      |                ^
a.cc: In function 'int main()':
a.cc:30:23: error: 'a' was not declared in this scope
   30 |         cout<<(cinint(a)+cinint(b))*cinint(h)/2<<endl;
      |                       ^
a.cc:30:33: error: 'b' was not declared in this scope
   30 |         cout<<(cinint(a)+cinint(b))*cinint(h)/2<<endl;
      |                                 ^
a.cc:30:44: error: 'h' was not declared in this scope
   30 |         cout<<(cinint(a)+cinint(b))*cinint(h)/2<<endl;
      |                                            ^
Language: C++

#include<iostream>
#include<math.h>
#include<string>
#include<algorithm>
using namespace std;

#define rep0(n) for(int i=0;i<n;i++)
#define rep(n) for(int i=1;i<=n;i++)

int const pi=3.1415926535;

int printint(int n){
	cout<<n<<endl;
	return 0;
}

int prints(string s){
	cout<<s<<endl;
	return 0;
}

int cinint(int n){
	int n;
	cin>>n;
	return n;
}

int main(){
	
	cout<<(cinint(a)+cinint(b))*cinint(h)/2<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int cinint(int)':
a.cc:23:13: error: declaration of 'int n' shadows a parameter
   23 |         int n;
      |             ^
a.cc:22:16: note: 'int n' previously declared here
   22 | int cinint(int n){
      |            ~~~~^
a.cc: In function 'int main()':
a.cc:30:23: error: 'a' was not declared in this scope
   30 |         cout<<(cinint(a)+cinint(b))*cinint(h)/2<<endl;
      |                       ^
a.cc:30:33: error: 'b' was not declared in this scope
   30 |         cout<<(cinint(a)+cinint(b))*cinint(h)/2<<endl;
      |                                 ^
a.cc:30:44: error: 'h' was not declared in this scope
   30 |         cout<<(cinint(a)+cinint(b))*cinint(h)/2<<endl;
      |                                            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    cin >> a >> b >> h;
    cout << (a+b)*h/2 << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 'a' was not declared in this scope
    5 |     cin >> a >> b >> h;
      |            ^
a.cc:5:17: error: 'b' was not declared in this scope
    5 |     cin >> a >> b >> h;
      |                 ^
a.cc:5:22: error: 'h' was not declared in this scope
    5 |     cin >> a >> b >> h;
      |                      ^
Language: C++

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

#define INF 1.1e9
#define LINF 1.1e18
#define FOR(i,a,b) for (int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define BIT(x,n) bitset<n>(x)
#define PI 3.14159265358979323846

typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> PP;

struct edge {
	int to, cost;
	edge(int t,int c):to(t),cost(c) {}
};


//-----------------------------------------------------------------------------

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

	int a,b,c;cin>>a>>b>>c;
	cout<<a*h/2+b*h/2<<endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:17: error: 'h' was not declared in this scope
   34 |         cout<<a*h/2+b*h/2<<endl;
      |                 ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  
	int a,b,h;
  	cin >> a >> b >> h;
  int ans = (a+b)*h/2
    cout << ans << endl;
  
  	
  
  
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'cout'
    9 |     cout << ans << endl;
      |     ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
	int a, b, c;
	cin >> a >> b >> c;
	cout << (a + b)*h / 2 << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: 'h' was not declared in this scope
    8 |         cout << (a + b)*h / 2 << endl;
      |                         ^
Language: Java

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int h = scanner.nextInt();
        System.out.print((a + b) * h / 2);
    }
}


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

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int h = sc.nextInt();
		int c =2;
		System.out.println((a+b)h/2);
	}
}

Compiler output:
Main.java:9: error: ')' or ',' expected
		System.out.println((a+b)h/2);
		                        ^
Main.java:9: error: not a statement
		System.out.println((a+b)h/2);
		                         ^
Main.java:9: error: ';' expected
		System.out.println((a+b)h/2);
		                           ^
3 errors
Language: C++

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int h = sc.nextInt();
		int c = 2;
		System.out.println((a+b)h/2);
	}
}

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: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	int a,b,c;
	cin >> a >> b >> c;
	cout << (a+b)*h/2 << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: 'h' was not declared in this scope
    6 |         cout << (a+b)*h/2 << endl;
      |                       ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	int a,h,b;
	cin>>a>>h>>b;
	cout<<(a+b)*h/w<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: 'w' was not declared in this scope
    6 |         cout<<(a+b)*h/w<<endl;
      |                       ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	int a,b,h;
	cin>>a>>b>>h;
	cout<<(a+b)*h/2
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: expected ';' before 'return'
    6 |         cout<<(a+b)*h/2
      |                        ^
      |                        ;
    7 |         return 0;
      |         ~~~~~~
Language: Java

import java.util.Scanner;
 
public class Main {
  public static void main(String[] args){
  Scanner scan = new Scanner(System.in);
   
  
  int a = scan.nextInt();
  int b = scan.nextInt();
  int h = scan.nextInt();
  scan.close();
  	system.out.println(((a + b) * h)/2);
 }
}

Compiler output:
Main.java:12: error: package system does not exist
  	system.out.println(((a + b) * h)/2);
  	      ^
1 error
Language: C++

import java.util.Scanner;
 
public class Main {
  public static void main(String[] args){
  Scanner scan = new Scanner(System.in);
   
  
  int a = scan.nextInt();
  int b = scan.nextInt();
  int h = scan.nextInt();
  scan.close();
  	system.out.println(((a + b) * h)/2);
 }
}

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

import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		a = s.nextInt();
		b = s.nextInt();
		h = s.nextInt();
		System.out.println((a + b) * h / 2);
	}
}

Compiler output:
Main.java:5: error: cannot find symbol
		a = s.nextInt();
		^
  symbol:   variable a
  location: class Main
Main.java:6: error: cannot find symbol
		b = s.nextInt();
		^
  symbol:   variable b
  location: class Main
Main.java:7: error: cannot find symbol
		h = s.nextInt();
		^
  symbol:   variable h
  location: class Main
Main.java:8: error: cannot find symbol
		System.out.println((a + b) * h / 2);
		                    ^
  symbol:   variable a
  location: class Main
Main.java:8: error: cannot find symbol
		System.out.println((a + b) * h / 2);
		                        ^
  symbol:   variable b
  location: class Main
Main.java:8: error: cannot find symbol
		System.out.println((a + b) * h / 2);
		                             ^
  symbol:   variable h
  location: class Main
6 errors
Language: C++

signed main(void){
  int a,b,h;

  cin >> a >> b >> h;
  cout << (a+b)*h/2 << "\r\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> a >> b >> h;
      |   ^~~
a.cc:5:3: error: 'cout' was not declared in this scope
    5 |   cout << (a+b)*h/2 << "\r\n";
      |   ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <queue>
#include <stack>
#include <map>
#include <vector>
#include <cstdio>
#include <cmath>
#include <cctype>
#define INF 1000000000
using namespace std;
bool debug=false;

int mian(){
  int a,b,h;
  cin>>a>>b>>h;
  cout<<(a+b)*h/2<<endl;
  return 0;
}


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 <bits/stdc++.h>

using namespace std;

int main() {
   int = a,b,h;
   cin >> a >> b >> h;
   cout << (a+b)*h/2 << endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: expected unqualified-id before '=' token
    6 |    int = a,b,h;
      |        ^
a.cc:7:11: error: 'a' was not declared in this scope
    7 |    cin >> a >> b >> h;
      |           ^
a.cc:7:16: error: 'b' was not declared in this scope
    7 |    cin >> a >> b >> h;
      |                ^
a.cc:7:21: error: 'h' was not declared in this scope
    7 |    cin >> a >> b >> h;
      |                     ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cmath>
#include <utility>
using namespace std;
#define fol(i,n) for (int i=0;i<n;i++)

int main(){
    int a,b,c;
    cin >>a>>b>>c;
cout << (a+b)*h/2<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: 'h' was not declared in this scope
   14 | cout << (a+b)*h/2<<endl;
      |               ^
Language: C++

package main

import (
  "fmt"
)

func main(){
  var a,b,h int
  fmt.Scan(&a, &b, &h)
  fmt.Println((a + b) * h / 2)
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:18: error: expected identifier before '&' token
    4 | scanf("%d %d %d".&a.&b.&c);
      |                  ^
Language: C++

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

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:23: error: 'c' was not declared in this scope
    6 |     printf("%d",(a+b)*c/2);
      |                       ^
Language: Java


public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner scan = new Scanner(System.in);

        int a = scan.nextInt();
        int b = scan.nextInt();
        int h = scan.nextInt();

        System.out.println(String.valueOf((a+b)*h/2));


    }
}


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

include <stdio.h>
int main(){
  int a, b, c;
  scanf("%d %d", &a, &b);
  printf("%d\n", c/2*(a+b));
  return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
	int a =sc.nextInt();
	int b =sc.nextInt();
	int h =sc.nextInt();
	System.out.println((a+b)h/2);
	}
	}

Compiler output:
Main.java:8: error: ')' or ',' expected
	System.out.println((a+b)h/2);
	                        ^
Main.java:8: error: not a statement
	System.out.println((a+b)h/2);
	                         ^
Main.java:8: error: ';' expected
	System.out.println((a+b)h/2);
	                           ^
3 errors
Language: Java

package spring;
import java.io.*;
public class abc045a {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		int a, b, h, ans = 0;
		
		while((a = System.in.read()) != -1);
		while((b = System.in.read()) != -1);
		while((h = System.in.read()) != -1);
	
		ans = ((a + b) * h / 2);
		System.out.println(ans);

	}

}


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

package spring;
import java.io.*;
public class abc045_a {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		int a, b, h, ans = 0;
		
		while((a = System.in.read()) != -1);
		while((b = System.in.read()) != -1);
		while((h = System.in.read()) != -1);
	
		ans = ((a + b) * h / 2);
		System.out.println(ans);

	}

}


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

#include <cstdio>

using namespace std;
#define sci(x)         int x;       scanf("%d", &x);
#define scii(x, y)     int x, y;    scanf("%d%d", &x, &y);
int main() {
  scii(a,b)sci(h)
  printf("%d\n",(a+b)*h/2);
}

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

#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;
int main(){
    int a,b,c,; cin>>a>>b>>c;
    cout<<(a+b)*c/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:15: error: expected unqualified-id before ';' token
   33 |     int a,b,c,; cin>>a>>b>>c;
      |               ^
Language: Java

		Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.nextLine());
        int b = Integer.parseInt(sc.nextLine());
        int h = Integer.parseInt(sc.nextLine());

    	System.out.println(String.valueOf((a+b)*h/2));


Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
		Scanner sc = new Scanner(System.in);
		^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: class, interface, enum, or record expected
    	System.out.println(String.valueOf((a+b)*h/2));
    	^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
cout<<(a+b)*(c/2)<<endl
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expected ';' before 'return'
    7 | cout<<(a+b)*(c/2)<<endl
      |                        ^
      |                        ;
    8 | return 0;
      | ~~~~~~
Language: C

#include <stdio.h>
 
int main()
{
int i;
char moji[3][101];
int cnt[3];
 
for(i = 0; i < 3; i++){
scanf("%s", moji[i]);
cnt[i] = 0;
}
 
int pos = 0;
char c;
while (1){
c = moji[pos][cnt[pos]];
if (c == 'a'){
cat[pos]++;
pos = 0;
}else if(c == 'b'){
cat[pos]++;
pos = 1;
}else if(c == 'c'){
cat[pos]++;
pos = 2;
}else if(c == '\0'){
if (pos == 0){
printf("A");
} else if (pos == 1){
printf("B");
} else if (pos == 2){
printf("C");
}
break;
}//if
}//while
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:1: error: 'cat' undeclared (first use in this function); did you mean 'cnt'?
   19 | cat[pos]++;
      | ^~~
      | cnt
main.c:19:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
 
int main()
{
int i;
char moji[3][101];
int cnt[3];
 
for(i = 0; i < 3; i++){
scanf("%s", moji[i]);
cnt[i] = 0;
}
 
int pos = 0;
char c;
while (1){
c = getchar(moji[pos][cnt[pos]]);
if (c == 'a'){
cat[pos]++;
pos = 0;
}else if(c == 'b'){
cat[pos]++;
pos = 1;
}else if(c == 'c'){
cat[pos]++;
pos = 2;
}else if(c == '\0'){
if (pos == 0){
printf("A");
} else if (pos == 1){
printf("B");
} else if (pos == 2){
printf("C");
}
break;
}//if
}//while
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:5: error: too many arguments to function 'getchar'
   17 | c = getchar(moji[pos][cnt[pos]]);
      |     ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:582:12: note: declared here
  582 | extern int getchar (void);
      |            ^~~~~~~
main.c:19:1: error: 'cat' undeclared (first use in this function); did you mean 'cnt'?
   19 | cat[pos]++;
      | ^~~
      | cnt
main.c:19:1: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.*;
public class Main{

public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a =sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
System.out.println((a + b)*h/2);

}
}

Compiler output:
Main.java:7: error: cannot find symbol
System.out.println((a + b)*h/2);
                           ^
  symbol:   variable h
  location: class Main
1 error
Language: C++


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

int main() {
  int a,b,n;
  cin >> a >> b >> n;
  cout << (a +b)*ｎ << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: '\U0000ff4e' was not declared in this scope
    8 |   cout << (a +b)*ｎ << endl;
      |                  ^~
Language: C++

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

int main() {
  int a,b,n;
  cin >> a >> b >> n;
  cout << (a +b)*ｎ << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: '\U0000ff4e' was not declared in this scope
    7 |   cout << (a +b)*ｎ << endl;
      |                  ^~
Language: C++

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

int main() {
  int a,b,n;
  cin >> a >> b >> n;
  cout << (a +b)*h << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: 'h' was not declared in this scope
    7 |   cout << (a +b)*h << endl;
      |                  ^
Language: C++

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

int main() {
  int a,b,n;
  cin >> a >> b >> n;
  cout << (a +b)*h << endl;

}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class MAIN {

	public static void main(String[] args) throws NumberFormatException, IOException{
		int a, b, h;

		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader in = new BufferedReader(isr);

		a = Integer.parseInt(in.readLine());
		b = Integer.parseInt(in.readLine());
		h = Integer.parseInt(in.readLine());

		System.out.println((a + b) * h / 2);
	}
}


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

#include <iostream>
using namespace std;

int main() {
cin >> a >> b >> h;
cout << h * (a + b) / 2 << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'a' was not declared in this scope
    5 | cin >> a >> b >> h;
      |        ^
a.cc:5:13: error: 'b' was not declared in this scope
    5 | cin >> a >> b >> h;
      |             ^
a.cc:5:18: error: 'h' was not declared in this scope
    5 | cin >> a >> b >> h;
      |                  ^
Language: C++

#include <iostream>

using namespace std;

int main(){
	int a, b, h;
	cin >> a
	cin >> b
	cin >> h
	cout << (a+b)*h/2 << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before 'cin'
    7 |         cin >> a
      |                 ^
      |                 ;
    8 |         cin >> b
      |         ~~~
Language: Java

class Main{
   public static void main(String[] args){
      Scanner in = new Scanner(System.in);
      int a = in.nextInt();
      int b = in.nextInt();
      int h = in.nextInt();
      int area = (a+b)*(h/2);
      System.out.println(area);
   }
}

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

<?php
    $l1 = trim(fgets(STDIN));
    $l2 = trim(fgets(STDIN));
    $l3 = trim(fgets(STDIN));
    echo ($l1 + $l2) * $l3 /2;
//    print_r($sIn);

?>


Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?php
      | ^
a.cc:3:5: error: '$l2' does not name a type
    3 |     $l2 = trim(fgets(STDIN));
      |     ^~~
a.cc:4:5: error: '$l3' does not name a type
    4 |     $l3 = trim(fgets(STDIN));
      |     ^~~
a.cc:5:10: error: expected constructor, destructor, or type conversion before '(' token
    5 |     echo ($l1 + $l2) * $l3 /2;
      |          ^
a.cc:8:1: error: expected unqualified-id before '?' token
    8 | ?>
      | ^
Language: C

#include <stdio.h>

void main () {
    int a,b,c,d

    scanf("%d%d%d", &a, &b, &c);

    d = ((a+b)*c)/2;

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

    return;
}

Compiler output:
main.c: In function 'main':
main.c:6:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    6 |     scanf("%d%d%d", &a, &b, &c);
      |     ^~~~~
main.c:8:5: error: 'd' undeclared (first use in this function)
    8 |     d = ((a+b)*c)/2;
      |     ^
main.c:8:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

void main () {
    int a,b,c,d

    scanf("%d%d%d", &a,&b,&c);

    d = ((a+b)*c)/2;

    printf("%d\n",&d;

    return;
}

Compiler output:
main.c: In function 'main':
main.c:6:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    6 |     scanf("%d%d%d", &a,&b,&c);
      |     ^~~~~
main.c:8:5: error: 'd' undeclared (first use in this function)
    8 |     d = ((a+b)*c)/2;
      |     ^
main.c:8:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:21: error: expected ')' before ';' token
   10 |     printf("%d\n",&d;
      |           ~         ^
      |                     )
main.c:12:12: error: expected ';' before '}' token
   12 |     return;
      |            ^
      |            ;
   13 | }
      | ~
Language: Java

import java.util.*;

public class Trapezoids {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int h = sc.nextInt();
		if(h%2!=0){throw new Exception("error");}
		else {
			System.out.println((a+b)/2*h);
		}
	
	}
}

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

#include<bits/stdc++.h>

using namespace std;

int main(void)
{
  int a,b,c;
  cin>>a>>b>>h;
  
  int ans = a*b;
   
  ans = ans + ((max(a,b)-min(a,b))*h)/2;

cout<<ans;

}

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

public class Main {

public static void main(String args[]) {

Scanner scan = new Scanner(System.in);


int a, b, h;

a = scan.newInt();
b = scan.newInt();
h = scan.newInt();

float area = (a+b)/2*h;

System.out.println(area);

}
}
}

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

#include <bits/stcd++.h>
using namespace std;
int a, b, h;
int main() {
	cin >> a >> b >> h;
	cout << (a + b) * h / 2 << endl;
	return 0;
}

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

    int main(){
    int a,b,h;
    cin>>a>>b>>h;
    double ans;
    ans = (a+b)*h/2;
    cout<<ans<<endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin>>a>>b>>h;
      |     ^~~
a.cc:6:5: error: 'cout' was not declared in this scope
    6 |     cout<<ans<<endl;
      |     ^~~~
a.cc:6:16: error: 'endl' was not declared in this scope
    6 |     cout<<ans<<endl;
      |                ^~~~
Language: C++

int main(){
int a,b,h;
cin>>a>>b>>h;
int ans;
ans = (a+b)*h/2;
cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:1: error: 'cin' was not declared in this scope
    3 | cin>>a>>b>>h;
      | ^~~
a.cc:6:1: error: 'cout' was not declared in this scope
    6 | cout<<ans<<endl;
      | ^~~~
a.cc:6:12: error: 'endl' was not declared in this scope
    6 | cout<<ans<<endl;
      |            ^~~~
Language: C++

#include <iostream>
using namespace;
int main() {
int a, b, c; cin >> a;cin>>b;cin>>c;
cout <<(a+b)*c/2<<endl;
}

Compiler output:
a.cc:2:16: error: expected identifier before ';' token
    2 | using namespace;
      |                ^
a.cc: In function 'int main()':
a.cc:4:14: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 | int a, b, c; cin >> a;cin>>b;cin>>c;
      |              ^~~
      |              std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 | cout <<(a+b)*c/2<<endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:5:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 | cout <<(a+b)*c/2<<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 <stdio.h>

int main()
{
int a, b, c;
scanf("%d%d%d", &a, &b, &c):
printf("%d", (a+b)*c/2);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:28: error: expected ';' before ':' token
    6 | scanf("%d%d%d", &a, &b, &c):
      |                            ^
      |                            ;
Language: C++

#include<iostream>

using namespace std;

int main(){
  int a, b, c;
  cin >> a;
  cin >> b;
  cin >> h;
  cout << (a + b) * h / 2 << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'h' was not declared in this scope
    9 |   cin >> h;
      |          ^