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

#include<bits/stdc++.h>
using namespace std;
int main()
{
int a[5];
for(int i=0;i<5;i++) cin>>a[i];
sort(a,a+5);
reverse(a,a+b);
for(int i=0;i<5;i++){
if(i) cout<<" ";
cout<<a[i];
}
}


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

#include <stdio.h>

int main(void) {
  int a[5], i, j, t;
  for(i = 0; i < n; ++i) scanf("%d", &a[i]);
  for(i = 0; i < n; ++i) for(j = i + 1; j < n; ++j) if(a[i] < a[j]) t = a[i], a[i] = a[j], a[j] = t;
  for(i = 0; i < 4; ++i) printf("%d ", a[i]);
  printf("%d\n", a[4]);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:18: error: 'n' was not declared in this scope
    5 |   for(i = 0; i < n; ++i) scanf("%d", &a[i]);
      |                  ^
a.cc:6:18: error: 'n' was not declared in this scope
    6 |   for(i = 0; i < n; ++i) for(j = i + 1; j < n; ++j) if(a[i] < a[j]) t = a[i], a[i] = a[j], a[j] = t;
      |                  ^
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main() {
  int n=0;
  vector<int> v;
  for(int i=0;i<5;i++) {
    cin>>n;
    v.push_back(n);
  }
  sort(v.begin(),v.end());
  reverse(v.begin(),v.end());
  for(int i=0;i<5;i++){
    cout<<v[i];
if(i!=4)
cout<<endl;
  cout<<endl;

    
  return 0;
}



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

#include <stdio.h>
    void main ()
    {

        int number[5];
        int i,j,a,n;
        for (i =0;i<5;++i)
	        scanf("%d",&number[i]);

        for (i=0; i<3;++i)
        { for (j=i+1; j<4;++j)
            {
                if (number[i]<number[j])
                {
                    a=number[i];
                    number[i]=number[j];
                    number[j]=a;
                }
            }
        }

        for(i= 0;i<6;++i)
        {
            printf("%d ", number[i]);
        }
    }



Compiler output:
a.cc:2:5: error: '::main' must return 'int'
    2 |     void main ()
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int a[5];
	for(int i=0;i<5;i++){
		cin>>a[i];
	    }
	sort(a,a+5);
	reverse(t,t+5);
	cout<<a[0];
	for(int j=1;j>=5;j++){
		cout<<" "<<a[j];
	    }
	cout<<endl;
	return 0;
	}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 't' was not declared in this scope
   10 |         reverse(t,t+5);
      |                 ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int a[5];
	for(int i=0;i<5;i++){
		cin>>a[i];
	    }
	sort(a,a+5);
	reverse(t,t+5);
	cout<<a[0];
	for(int j=1;j<=5;j++){
		cout<<" "<<a[j];
	    }
	cout<<endl;
	return 0;
	}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 't' was not declared in this scope
   10 |         reverse(t,t+5);
      |                 ^
Language: C++

#include<iostream>
int main()
{
	int n[5];
	for (int i = 0; i < 5; i++)
	{
		std::cin >> n[i];
	}
	for (int i = 0; i < 5; i++)
	{
		int max = INT_MIN, max_index = 0;
		for (int j = i; j < 5; j++)
		{
			if (max < n[j])
			{
				max = n[j];
				max_index = j;
			}
		}
		std::swap(n[i], n[max_index]);
	}
	for (int i = 0; i < 5; i++)
	{
		std::cout << n[i] << ' ';
	}
	std::cout << std::endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: 'INT_MIN' was not declared in this scope
   11 |                 int max = INT_MIN, max_index = 0;
      |                           ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | int main()
a.cc:17:33: error: 'max_index' was not declared in this scope
   17 |                                 max_index = j;
      |                                 ^~~~~~~~~
a.cc:20:35: error: 'max_index' was not declared in this scope
   20 |                 std::swap(n[i], n[max_index]);
      |                                   ^~~~~~~~~
Language: C++

#include<numeric>
#include<iostream>

using namespace std;

int main()
{
	int a[5];
	for(int i=0;i<5;i++)	cin>>a[i];
	sort(a,a+5,greater<int>());
	for(int i=0;i<5;i++)	cout<<(i?" ":"")<<a[i];
	cout<<endl;
	return 0;
}

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

a[],i,j;main(){while(~scanf("%d",a+i))qsort(a,++i,4,"YXZRPQ\213\0+\x2\303");for(;i--;)j=!printf(i?"%d ":"%d\n",a[i]);}

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a[],i,j;main(){while(~scanf("%d",a+i))qsort(a,++i,4,"YXZRPQ\213\0+\x2\303");for(;i--;)j=!printf(i?"%d ":"%d\n",a[i]);}
      | ^
a.cc:1:9: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | a[],i,j;main(){while(~scanf("%d",a+i))qsort(a,++i,4,"YXZRPQ\213\0+\x2\303");for(;i--;)j=!printf(i?"%d ":"%d\n",a[i]);}
      |         ^~~~
a.cc: In function 'int main()':
a.cc:1:34: error: 'a' was not declared in this scope
    1 | a[],i,j;main(){while(~scanf("%d",a+i))qsort(a,++i,4,"YXZRPQ\213\0+\x2\303");for(;i--;)j=!printf(i?"%d ":"%d\n",a[i]);}
      |                                  ^
a.cc:1:36: error: 'i' was not declared in this scope
    1 | a[],i,j;main(){while(~scanf("%d",a+i))qsort(a,++i,4,"YXZRPQ\213\0+\x2\303");for(;i--;)j=!printf(i?"%d ":"%d\n",a[i]);}
      |                                    ^
a.cc:1:23: error: 'scanf' was not declared in this scope
    1 | a[],i,j;main(){while(~scanf("%d",a+i))qsort(a,++i,4,"YXZRPQ\213\0+\x2\303");for(;i--;)j=!printf(i?"%d ":"%d\n",a[i]);}
      |                       ^~~~~
a.cc:1:39: error: 'qsort' was not declared in this scope
    1 | a[],i,j;main(){while(~scanf("%d",a+i))qsort(a,++i,4,"YXZRPQ\213\0+\x2\303");for(;i--;)j=!printf(i?"%d ":"%d\n",a[i]);}
      |                                       ^~~~~
a.cc:1:82: error: 'i' was not declared in this scope
    1 | a[],i,j;main(){while(~scanf("%d",a+i))qsort(a,++i,4,"YXZRPQ\213\0+\x2\303");for(;i--;)j=!printf(i?"%d ":"%d\n",a[i]);}
      |                                                                                  ^
a.cc:1:87: error: 'j' was not declared in this scope
    1 | a[],i,j;main(){while(~scanf("%d",a+i))qsort(a,++i,4,"YXZRPQ\213\0+\x2\303");for(;i--;)j=!printf(i?"%d ":"%d\n",a[i]);}
      |                                                                                       ^
a.cc:1:112: error: 'a' was not declared in this scope
    1 | a[],i,j;main(){while(~scanf("%d",a+i))qsort(a,++i,4,"YXZRPQ\213\0+\x2\303");for(;i--;)j=!printf(i?"%d ":"%d\n",a[i]);}
      |                                                                                                                ^
a.cc:1:90: error: 'printf' was not declared in this scope
    1 | a[],i,j;main(){while(~scanf("%d",a+i))qsort(a,++i,4,"YXZRPQ\213\0+\x2\303");for(;i--;)j=!printf(i?"%d ":"%d\n",a[i]);}
      |                                                                                          ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | a[],i,j;main(){while(~scanf("%d",a+i))qsort(a,++i,4,"YXZRPQ\213\0+\x2\303");for(;i--;)j=!printf(i?"%d ":"%d\n",a[i]);}
Language: C++

a[5],i,j;main(){for(;j=~scanf("%s",i+a)||i+!!printf(i--?"%s ":"%s\n",a+--i);qsort(a,++i,4,"YXZRPQ\213\0+\x2\303"));}

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a[5],i,j;main(){for(;j=~scanf("%s",i+a)||i+!!printf(i--?"%s ":"%s\n",a+--i);qsort(a,++i,4,"YXZRPQ\213\0+\x2\303"));}
      | ^
a.cc:1:10: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | a[5],i,j;main(){for(;j=~scanf("%s",i+a)||i+!!printf(i--?"%s ":"%s\n",a+--i);qsort(a,++i,4,"YXZRPQ\213\0+\x2\303"));}
      |          ^~~~
a.cc: In function 'int main()':
a.cc:1:22: error: 'j' was not declared in this scope
    1 | a[5],i,j;main(){for(;j=~scanf("%s",i+a)||i+!!printf(i--?"%s ":"%s\n",a+--i);qsort(a,++i,4,"YXZRPQ\213\0+\x2\303"));}
      |                      ^
a.cc:1:36: error: 'i' was not declared in this scope
    1 | a[5],i,j;main(){for(;j=~scanf("%s",i+a)||i+!!printf(i--?"%s ":"%s\n",a+--i);qsort(a,++i,4,"YXZRPQ\213\0+\x2\303"));}
      |                                    ^
a.cc:1:38: error: 'a' was not declared in this scope
    1 | a[5],i,j;main(){for(;j=~scanf("%s",i+a)||i+!!printf(i--?"%s ":"%s\n",a+--i);qsort(a,++i,4,"YXZRPQ\213\0+\x2\303"));}
      |                                      ^
a.cc:1:25: error: 'scanf' was not declared in this scope
    1 | a[5],i,j;main(){for(;j=~scanf("%s",i+a)||i+!!printf(i--?"%s ":"%s\n",a+--i);qsort(a,++i,4,"YXZRPQ\213\0+\x2\303"));}
      |                         ^~~~~
a.cc:1:46: error: 'printf' was not declared in this scope
    1 | a[5],i,j;main(){for(;j=~scanf("%s",i+a)||i+!!printf(i--?"%s ":"%s\n",a+--i);qsort(a,++i,4,"YXZRPQ\213\0+\x2\303"));}
      |                                              ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | a[5],i,j;main(){for(;j=~scanf("%s",i+a)||i+!!printf(i--?"%s ":"%s\n",a+--i);qsort(a,++i,4,"YXZRPQ\213\0+\x2\303"));}
a.cc:1:77: error: 'qsort' was not declared in this scope
    1 | a[5],i,j;main(){for(;j=~scanf("%s",i+a)||i+!!printf(i--?"%s ":"%s\n",a+--i);qsort(a,++i,4,"YXZRPQ\213\0+\x2\303"));}
      |                                                                             ^~~~~
Language: C++

*a=&a;main(i){*a=~scanf("%d",++a)?!printf(i?"%d\n":"%d ",*--a,main(0)):qsort(a-5,5,4,"YXZRPQ?+\2\303");}

Compiler output:
a.cc:1:3: error: expected constructor, destructor, or type conversion before '=' token
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf(i?"%d\n":"%d ",*--a,main(0)):qsort(a-5,5,4,"YXZRPQ?+\2\303");}
      |   ^
a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf(i?"%d\n":"%d ",*--a,main(0)):qsort(a-5,5,4,"YXZRPQ?+\2\303");}
      |           ^
Language: C++

*a=&a;main(i){*a=~scanf("%d",++a)?!printf(i?"%d\n":"%d ",*--a,main(0)):qsort(a-5,5,4,"YXZRPQ\213\0+\2テδ。");}

Compiler output:
a.cc:1:3: error: expected constructor, destructor, or type conversion before '=' token
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf(i?"%d\n":"%d ",*--a,main(0)):qsort(a-5,5,4,"YXZRPQ\213\0+\2テδ。");}
      |   ^
a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf(i?"%d\n":"%d ",*--a,main(0)):qsort(a-5,5,4,"YXZRPQ\213\0+\2テδ。");}
      |           ^
Language: C++

import java.util.*;

public class Main {
	void run() {
		Scanner sc = new Scanner(System.in);
		
		int[] num = new int [5];
		for (int i=0;i<5;i++) {
			num[i] = sc.nextInt();
		}
		Arrays.sort(num);
		
		for (int i=num.length-1;i>=0;i--) {
			System.out.print(num[i]);
			if (i != 0)System.out.print(" ");
			else System.out.println();
		}
	}
	
	public static void main (String[] args) {
		new Main().run();
	}
}

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

#include <iostream>
#include <vector>
#include <cstdio>

using namespace std;

int main() {
	vector<int> num(5);
	cin >> num[0] >> num[1] >> num[2] >> num[3] >> num[4];
	sort(num.begin(), num.end());
	printf("%d %d %d %d %d\n", num[0],num[1],num[2],num[3],num[4]);
	return 0;
}

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

#include <iostream>
using namespace std;
int main() {
	int a[5];
	for(int i=0;i<5;i++) cin >> a[i];
	sort(a, a+5);
	cout << a[4];
	for(int i = 3; i>=0; i-- ) cout << " " << a[i];
	cout << endl;
	return 0;
}

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

#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int val;
    vector<int> is;
    for (int i = 0; i < 5 && scanf("%d", &val); i++) 
        is.push_back(val);

    sort(is.begin(), is.end());
    for (int i = is.size() - 1; i > 0; i--)
        cout << is[i] << " ";
    cout << is[0] << endl;
}

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

#include<iostream>
using namespace std;

int main(){
int a,b,c,d,e;
int A,B,C,D,E;
cin>>a>>b>>c>>d>>E;
if(a>b){
A=a;
B=b;}
else{
A=b;
B=a;}
if(c<B){
C=c;}
else{
C=B;
if(c<A){
B=c;}
else{
B=A;
A=c;}}
if(d<C){
D=d;}
else{
D=C;
if(d<B){
C=d;}
else{
C=B;
if(d<A){
B=d;}
else{
B=A;
A=d;}}}
if(e<D){
E=e;
else{
E=D;
if(e<C){
D=e;}
else{
D=C;
if(e<B){
C=e;}
else{
C=B;
if(e<A){
B=e;}
else{
B=A;
A=e;}}}}
cout<<A<<" "<<B<<" "<<C<<" "<<D<<" "<<E;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:1: error: expected '}' before 'else'
   38 | else{
      | ^~~~
a.cc:36:8: note: to match this '{'
   36 | if(e<D){
      |        ^
Language: C++

#include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
	int a[5];
	for(int i=0;i<5;i++) cin>>a[i];
	sort(a,a+5,greater<int>());
	for(int i=0;i<5;i++) cout<<a[i]1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:40: error: expected ';' before numeric constant
    9 |         for(int i=0;i<5;i++) cout<<a[i]1;
      |                                        ^
      |                                        ;
Language: C++

#include<iostream>
using namespace std;

int main(){
int a[5];
int biggest[5];
cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4];
biggest[0]=a[0];
for(int i=1;i<5;i++){
for(int j=0;j<i;j++){
if(a[i]>biggest[j]){
for(int k=i;k>j;k--){
biggest[k]=biggest[k-1];}
biggest[j]=a[i];
break;}}}
cout<<biggest[0]<<" "<<biggest[1]<<" "<<biggest[2]<<" "<<biggest[3]<<" "<<biggest[4];
}}

Compiler output:
a.cc:17:2: error: expected declaration before '}' token
   17 | }}
      |  ^
Language: C++

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

int main(){
int a;
int b[5];
int c;
int d;
int e;
c=0;
while(c<5){
b[c]=0;
c=c+1;
}
c=0;
while(c<5){
cin >>a;
d=0;
while(1){if(a>=b[d]){e=3; if(e>=d){while(e>=d){b[e+1]=b[e]; e=e-1;}} b[d]=a; break;} d=d+1;     }
c=c+1;
}
c=0;
while(c<5){
cout << b[c]
if(c<4){cout <<" "}
c=c+1;}


}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: expected ';' before 'if'
   25 | cout << b[c]
      |             ^
      |             ;
   26 | if(c<4){cout <<" "}
      | ~~
Language: C++

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

int main(){
int a;
int b[5];
int c;
int d;
int e;
c=0;
while(c<5){
b[c]=0;
c=c+1;
}
c=0;
while(c<5){
cin >>a;
d=0;
while(1){if(a>=b[d]){e=3; if(e>=d){while(e>=d){b[e+1]=b[e]; e=e-1;}} b[d]=a; break;} d=d+1;     }
c=c+1;
}
c=0;
while(c<5){
cout << b[c]
if(c<4){cout <<" ";}
c=c+1;}
cout << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: expected ';' before 'if'
   25 | cout << b[c]
      |             ^
      |             ;
   26 | if(c<4){cout <<" ";}
      | ~~
Language: C++

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

int main(){
	int a[5];
	for(int i=1;i<6;i++){
		cin>>a[i];
	}
	sort(a+1,a+6);
	for(int i=5;i>0;i--){
		cout<<a[i]<<' ';
}
	endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: statement cannot resolve address of overloaded function
   14 |         endl;
      |             ^
Language: C++

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

int main(){
	int a[5];
	for(int i=1;i<6;i++){
		cin>>a[i];
	}
	sort(a+1,a+6);
	for(int i=5;i>0;i--){
		if(i==1)cout<<a[i]<<;
		else cout<<a[i]<<' ';
		
}
	cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:37: error: expected primary-expression before ';' token
   12 |                 if(i==1)cout<<a[i]<<;
      |                                     ^
Language: C++

l = map(int, raw_input().strip().split(" "));
print " ".join(sorted(l, lambda x, y: y - x));

Compiler output:
a.cc:1:1: error: 'l' does not name a type
    1 | l = map(int, raw_input().strip().split(" "));
      | ^
a.cc:2:1: error: 'print' does not name a type; did you mean 'int'?
    2 | print " ".join(sorted(l, lambda x, y: y - x));
      | ^~~~~
      | int
Language: C++

#include <algorithm>
#include <functional>

using namespace std;

int main()
{
    int input[5];

    for (int i = 0; i < 5; i++)
        cin >> input[i];

    sort(input, input + 5, greater<int>());

    for (int i = 0; i < 5; i++)
        cout << input[i] << " ";
    cout << '\b\n';
//    cout << input[0] << " " << input[1] << " " << input[2] << " " << input[3];
//    cout << " " << input[4] << endl;


    return 0;
}

Compiler output:
a.cc:17:13: warning: multi-character character constant [-Wmultichar]
   17 |     cout << '\b\n';
      |             ^~~~~~
a.cc: In function 'int main()':
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |         cin >> input[i];
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <functional>
  +++ |+#include <iostream>
    3 | 
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout << input[i] << " ";
      |         ^~~~
a.cc:16:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout << '\b\n';
      |     ^~~~
a.cc:17:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <algorithm>
#include <functional>

using namespace std;

int main()
{
    int input[5];

    for (int i = 0; i < 5; i++)
        cin >> input[i];

    sort(input, input + 5, greater<int>());

    for (int i = 0; i < 5; i++)
        if (i != 4)
            cout << input[i] << " ";
    cout << endl;
//    cout << input[0] << " " << input[1] << " " << input[2] << " " << input[3];
//    cout << " " << input[4] << endl;


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |         cin >> input[i];
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <functional>
  +++ |+#include <iostream>
    3 | 
a.cc:17:13: error: 'cout' was not declared in this scope
   17 |             cout << input[i] << " ";
      |             ^~~~
a.cc:17:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:5: error: 'cout' was not declared in this scope
   18 |     cout << endl;
      |     ^~~~
a.cc:18:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:13: error: 'endl' was not declared in this scope
   18 |     cout << endl;
      |             ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <functional>
  +++ |+#include <ostream>
    3 |
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <deque>
#include <functional>

using namespace std;

int main(void)
{
	int a,b,c,d,e;
	while(cin>>a>>b>>c>>d>>e)
	{
		deque<int> nums;
		nums.push_back(a);
		nums.push_back(b);
		nums.push_back(c);
		nums.push_back(d);
		nums.push_back(e);
		sort( nums.begin(), nums.end(), greater<int>() );
		deque<int>::iterator it = nums.begin();
		while( it != nums.end() )
		{
			cout<<*it<<" ";
			++it;
		}
		nums.clear;
		cout<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:22: error: invalid use of non-static member function 'void std::deque<_Tp, _Alloc>::clear() [with _Tp = int; _Alloc = std::allocator<int>]'
   27 |                 nums.clear;
      |                 ~~~~~^~~~~
In file included from /usr/include/c++/14/deque:66,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_deque.h:1835:7: note: declared here
 1835 |       clear() _GLIBCXX_NOEXCEPT
      |       ^~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int n[5];
  for(int i=0;i<5;i++) cin >> n[i];
  sort(n,n+5greater<int>());
  for(int i=0;i<5;i++){
    if(i!=4) cout << n[i] << ' ';
    else cout << n[i] << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: unable to find numeric literal operator 'operator""greater'
    7 |   sort(n,n+5greater<int>());
      |            ^~~~~~~~
a.cc:7:21: error: expected primary-expression before 'int'
    7 |   sort(n,n+5greater<int>());
      |                     ^~~
Language: C++

#include<iostream>
#include<vector>
std::vector<int> qsort(std::vector<int> xs);


int main(){
	std::vector<int> vec(5);
	for(int i=0;i<5;i++){
		std::cin>>vec[i];
	}
	vec=qsort(vec);
	for(int i=4;i>-1;i--){
		std::cout<<vec[i];
		if(i!=0)std::cout<<" ";
	}
	std::cout<<std::endl;
	
	return 0;
}

std::vector<int> qsort(std::vector<int> xs){

	if(xs.empty())return xs;
	else{
			int x=xs[0];
		std::vector<int> left;
		std::vector<int> right;
		for(int i=1;i<xs.size();i++){
			if(x>xs[i])left.push_back(xs[i]);
			else if(x<=xs[i])right.push_back(xs[i]);
		}

Compiler output:
a.cc: In function 'std::vector<int> qsort(std::vector<int>)':
a.cc:31:18: error: expected '}' at end of input
   31 |                 }
      |                  ^
a.cc:24:13: note: to match this '{'
   24 |         else{
      |             ^
a.cc:31:18: error: expected '}' at end of input
   31 |                 }
      |                  ^
a.cc:21:44: note: to match this '{'
   21 | std::vector<int> qsort(std::vector<int> xs){
      |                                            ^
a.cc:31:18: warning: control reaches end of non-void function [-Wreturn-type]
   31 |                 }
      |                  ^
Language: C++

#include <iostream>

using namespace std;

int main(void){

  int a[5];
  for( int i = 0 ; i < 5 ; i++ ){
    cin >> a[i]; 
    }
  sort( a , a + 5 );
  for( int i = 4 ; i >= 0 ; i-- ){
    cout << a[i];
    if( i != 0 )cout << " ";
  }
  cout << endl;
  return 0;
}

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

#include <iostream>
using namespace std;

int main() {
	int a,b,c,d,e;
	cin>>a>>b>>c>>d>>e;
	int num[]={a,b,c,d,e};
	for(int i=0;i<5;i++)
		for(int j=i+1;j<5;j++)
			if(num[i]<num[j])
				swap(num[i],num[j]);
	a=num[0];
	b=num[1];
	c=num[2];
	d=num[3];
	e=num[4];
	cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;<<" "<<
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:55: error: expected primary-expression before '<<' token
   17 |         cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;<<" "<<
      |                                                       ^~
a.cc:18:1: error: expected primary-expression before '}' token
   18 | }
      | ^
Language: Java

def fact(a):
	if a == 0:
		return 1
	return fact(a-1) * a

print fact(input())

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
def fact(a):
^
  (use --enable-preview to enable unnamed classes)
Main.java:1: error: <identifier> expected
def fact(a):
          ^
Main.java:1: error: ';' expected
def fact(a):
           ^
3 errors
Language: Java

import java.io.*

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str;
while((str=br.readLine())!=null){
int x=Integer.parseInt(str);
System.out.println(fact(x));
}
}
private static int fact(int x){
if(x==1)return 1;
return x*fact(x-1);
}
}

Compiler output:
Main.java:1: error: ';' expected
import java.io.*
                ^
1 error
Language: Java

import java.util.*;
public class aop {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		while(n>=1 && n<=10){
			System.out.println(Math.pow(n,n));
			n = sc.nextInt();
		}
	}
}

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

public class factorial{
    public static void main(String args[]){
        int n = Integer.parseInt(args[0]);
        int answer = 1;
        while (n != 0){
            answer *= n;
            n--;
        }

        System.out.println(answer);
    }
}

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

public class Factorial{
    public static void main(String args[]){
        int n = Integer.parseInt(args[0]);
        int answer = 1;
        while (n != 0){
            answer *= n;
            n--;
        }

        System.out.println(answer);
    }
}

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

import java.util.*;
public class Sort {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = 1;
		for(int i = sc.nextInt();i!=0;i--){
			a *= i;
		}
		System.out.println(a);
	}
}

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

import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
long i = sc.nextLong();
Long a = 1;
for(;i>0;i--){
a *= i;
}
System.out.println(a);
}
}

Compiler output:
Main.java:6: error: incompatible types: int cannot be converted to Long
Long a = 1;
         ^
1 error
Language: Java

import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int i = sc.nextLong();
long a = 1;
for(;i>0;i--){
a *= i;
}
System.out.println(a);
}
}

Compiler output:
Main.java:5: error: incompatible types: possible lossy conversion from long to int
int i = sc.nextLong();
                   ^
1 error
Language: Java

public class Fact {
   public static void main(String args[]) {
      for (int counter = 0; counter <= 10; counter++){
         System.out.printf("%d! = %d\n", counter,
         factorial(counter));
      }
   }
   public static long factorial(long number) {
      if (number <= 1)
         return 1;
      else
         return number * factorial(number - 1);
   }
}

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

import java.util.Scanner;
public class Factorial{
   public static void main(String args[]){
      
      Scanner scanner = new Scanner(System.in);
      System.out.println("Enter the number:");
     
      int num = scanner.nextInt();
     
      int factorial = fact(num);
      System.out.println("Factorial of entered number is: "+factorial);
   }
   static int fact(int n)
   {
       int output;
       if(n==1){
         return 1;
       }
      
       output = fact(n-1)* n;
       return output;
   }
}

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

package Factorial;

import java.util.Scanner;

public class Factorial {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        while (in.hasNext()) {
            int number = in.nextInt();
            if (number <= 1 || number >= 20) {
            } else {
                System.out.println(factorial(number));
            }

        }
    }

    public static int factorial(int num) {
        if (num <= 1) {
            return 1;
        } else {
            return num * factorial(num - 1);
        }
    }

}

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


import java.util.Scanner;

public class Factorial {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        while (in.hasNext()) {
            int number = in.nextInt();
            if (number <= 1 || number >= 20) {
            } else {
                System.out.println(factorial(number));
            }

        }
    }

    public static int factorial(int num) {
        if (num <= 1) {
            return 1;
        } else {
            return num * factorial(num - 1);
        }
    }

}

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

import java.util.Scanner;

public class Factorial {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        while (in.hasNext()) {
            int number = in.nextInt();
            if (number <= 1 || number >= 20) {
            } else {
                System.out.println(factorial(number));
            }

        }
    }

    public static int factorial(int num) {
        if (num == 0) {
            return 1;
        }
        if (num == 1) {
            return 1;
        } else {
            return num * factorial(num - 1);
        }
    }

}

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

import java.util.Scanner;

public class Main{

    public static void main(String[] args) {

    Scanner in = new Scanner(System.in);
 while (in.hasNext()) {
    int number = sc.nextInt();
 
    int factorial = number;
    for(int i = 1; i < number; i++){
        factorial = factorial*(number - i);
    }
 
    System.out.println(factorial);
    }
}
    

}

Compiler output:
Main.java:9: error: cannot find symbol
    int number = sc.nextInt();
                 ^
  symbol:   variable sc
  location: class Main
1 error
Language: Java

public static void main(String[] args){
    Scanner in = new Scanner(System.in);
 
    int number = sc.nextInt();
 
    int factorial = number;
    for(int i = 1; i < n; i++){
        factorial = factorial*(number - i);
    }
 
    System.out.println(factorial);
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java


class Main{
public static void main(String[] args){
    Scanner in = new Scanner(System.in);
 
    int number = sc.nextInt();
 
    int factorial = number;
    for(int i = 1; i < n; i++){
        factorial = factorial*(number - i);
    }
 
    System.out.println(factorial);
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
    Scanner in = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
    Scanner in = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
    int number = sc.nextInt();
                 ^
  symbol:   variable sc
  location: class Main
Main.java:9: error: cannot find symbol
    for(int i = 1; i < n; i++){
                       ^
  symbol:   variable n
  location: class Main
4 errors
Language: Java

import java.util.Scanner;


class Main{
    public static void main(String[] args){
    Scanner in = new Scanner(System.in);
 
    int number = sc.nextInt();
 
    int factorial = number;
    for(int i=1; i < n; i++){
        factorial = factorial * (number - i);
    }
 
    System.out.println(factorial);
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
    int number = sc.nextInt();
                 ^
  symbol:   variable sc
  location: class Main
Main.java:11: error: cannot find symbol
    for(int i=1; i < n; i++){
                     ^
  symbol:   variable n
  location: class Main
2 errors
Language: Java

import java.util.*;

class Main{
    public static void main(String[] args){
    Scanner in = new Scanner(System.in);
 
    int number = sc.nextInt();
 
    int factorial = number;
    for(int i = 1; i < number; i++){
        factorial = factorial*(number - i);
    }
 
    System.out.println(factorial);
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
    int number = sc.nextInt();
                 ^
  symbol:   variable sc
  location: class Main
1 error
Language: Java

class Main{
    public static void main(String[] args){
    Scanner in = new Scanner(System.in);
 
    int number = in.nextInt();
 
    int factorial = number;
    for(int i = 1; i < number; i++){
        factorial = factorial*(number - i);
    }
 
    System.out.println(factorial);
    }
}

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: Java

import java.util.*;
import java.math.*;

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

	public static void main(String[] args){
		
		while(scan.hasNext()){
			int n = scan.nextInt();
			BigInteger b = BigInteger.valueOf(1);
			for(int i = n; i > 0; i--){
				b *= b.multiply(BigInteger.valueOf(i));
			}
			System.out.printf("%s\n", b.toString());
		}
	}
}

Compiler output:
Main.java:13: error: bad operand types for binary operator '*'
				b *= b.multiply(BigInteger.valueOf(i));
				  ^
  first type:  BigInteger
  second type: BigInteger
1 error
Language: Java

package practice;

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

public class Factorial {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		int n = Integer.parseInt(str);

		System.out.println(math(n));
	}
	static int math(int n){
		for(int i = n ; 1 < i ; i--) {

			if (i == 0){
				break;
			}

			n *= (i-1);
		}
		return n;
	}
}

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

import java.util.*;
/*
Main class for AOJ where there is no input.
*/
public class Main{
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      long n = Integer.parseInt(sc.nextLine());
      System.out.println(factorial(n));
   }//main   
   
   public static long factorial(long n){
      if(n == 1){
         return 1;
      }else{
         return n * factorial(n - 1);
      }
   }

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

import java.util.Scanner;

public class p0019{
	public p0019(){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int t = 1;
		
		while(n > 1){
			t *= n--;
		}
		
		System.out.println(t);
	}

	public static void main(String[] args){
		p0019 test = new p0019();
	}
}

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

public class Main {
	Scanner sc = new Scanner(System.in);
	int rep(int n){
		if(n == 0){
			return 1;
		}else{
			return rep(n-1)*n;
		}
	}
	void run(){
		int n = sc.nextInt();
		System.out.println(rep(n));
	}
	public static void main(String[] args){
		Main m = new Main();
		m.run();
		
	}
}

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

public class ku {

	/**
	 * @param args
	 */
	public static void main(String[] args)
			throws java.io.IOException{
		int n=System.in.read();
		System.out.print(fact(n));
		// TODO 自動生成されたメソッド・スタブ
		
	}
	
	public static int fact(int n){
		if(n==0) return 1;
		return n*fact(n-1);
		
	}

}

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

class Main{
	public static void main(String[] args)
			throws java.io.IOException{
		 BufferedReader d = new BufferedReader(new InputStreamReader(System.in));
		String n=d.readLine();
		System.out.print(fact(Integer.parseInt(n)));
		// TODO 自動生成されたメソッド・スタブ
		
	}
	
	public static int fact(int n){
		if(n==0) return 1;
		return n*fact(n-1);
		
	};
		
	}}

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

class Main{public static void main(String[] args)
			throws java.io.IOException{
		 BufferedReader d = new BufferedReader(new InputStreamReader(System.in));
		String n=d.readLine();
		System.out.print(fact(Integer.parseInt(n)));
		// TODO 自動生成されたメソッド・スタブ
		
	}
	
	public static long fact(int n){
		if(n==0) return 1;
		return n*fact(n-1);
}

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

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int fact = sc.nextInt();
		for(int i = fact-1;i >= 1;i--){
			fact *= i;
		}
		System.out.println(fact);
		exit(0);
    }
}

Compiler output:
Main.java:11: error: cannot find symbol
		exit(0);
		^
  symbol:   method exit(int)
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int fact = factorial(sc.nextInt());
		System.out.println(fact);

	}

	public static int factorial(int n){
		for(int i = fact-1;i >= 1;i--){
			fact *= i;
		}
	}
}

Compiler output:
Main.java:12: error: cannot find symbol
		for(int i = fact-1;i >= 1;i--){
		            ^
  symbol:   variable fact
  location: class Main
Main.java:13: error: cannot find symbol
			fact *= i;
			^
  symbol:   variable fact
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int fact = factorial(sc.nextInt());
		System.out.println(fact);

	}

	public static int factorial(int n){
		for(int i = fact-1;i >= 1;i--){
			fact *= i;
		}
		return fact;
	}
}

Compiler output:
Main.java:12: error: cannot find symbol
		for(int i = fact-1;i >= 1;i--){
		            ^
  symbol:   variable fact
  location: class Main
Main.java:13: error: cannot find symbol
			fact *= i;
			^
  symbol:   variable fact
  location: class Main
Main.java:15: error: cannot find symbol
		return fact;
		       ^
  symbol:   variable fact
  location: class Main
3 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long fact = factorial(sc.nextInt());
		System.out.println(fact);
	}
	
	public static int factorial(long fact){
		if(fact == 0){
			fact = 1;
		}else{
			for(int i = fact-1;i >= 1;i--){
				fact *= i;
			}
		}
		return fact;
	}
}

Compiler output:
Main.java:14: error: incompatible types: possible lossy conversion from long to int
			for(int i = fact-1;i >= 1;i--){
			                ^
Main.java:18: error: incompatible types: possible lossy conversion from long to int
		return fact;
		       ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long fact = factorial((long)sc.nextInt());
		System.out.println(fact);
	}
	
	public static int factorial(long fact){
		if(fact == 0){
			fact = 1;
		}else{
			for(int i = fact-1;i >= 1;i--){
				fact *= i;
			}
		}
		return fact;
	}
}

Compiler output:
Main.java:14: error: incompatible types: possible lossy conversion from long to int
			for(int i = fact-1;i >= 1;i--){
			                ^
Main.java:18: error: incompatible types: possible lossy conversion from long to int
		return fact;
		       ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long fact = factorial(sc.nextLong());
		System.out.println(fact);
	}
	
	public static int factorial(long fact){
		if(fact == 0){
			fact = 1;
		}else{
			for(int i = fact-1;i >= 1;i--){
				fact *= i;
			}
		}
		return fact;
	}
}

Compiler output:
Main.java:14: error: incompatible types: possible lossy conversion from long to int
			for(int i = fact-1;i >= 1;i--){
			                ^
Main.java:18: error: incompatible types: possible lossy conversion from long to int
		return fact;
		       ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long fact = factorial(sc.nextLong());
		System.out.println(fact);
	}
	
	public static long factorial(long fact){
		if(fact == 0){
			fact = 1;
		}else{
			for(int i = fact-1;i >= 1;i--){
				fact *= i;
			}
		}
		return fact;
	}
}

Compiler output:
Main.java:14: error: incompatible types: possible lossy conversion from long to int
			for(int i = fact-1;i >= 1;i--){
			                ^
1 error
Language: Java

public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int ans = 1;
for(int i = 2; i<=n; i++) ans*=i;
System.out.println(ans);
}
}

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: Java

import java.util.Scanner;

public class aoj0019{
  public static void main(String args[]){
    Scanner s=new Scanner(System.in);
    long n=s.nextInt(),a=1;
  	for(int i=1;i<=n;++i)a*=i;
    System.out.println(a);
  }
}

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

class Main {
    public static void main(String[] args) {
        try {
           BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
           int n = Integer.parseInt(reader.readLine());
           int fact = 1;
           for(int i = n;i >= 1;i--) {
                fact *= i;
           }
           System.out.println(fact);
         }
         catch(IOException e) {
          System.out.println(e);
         }
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
           BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
           ^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
           BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
                                       ^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
           BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
                                                          ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:12: error: cannot find symbol
         catch(IOException e) {
               ^
  symbol:   class IOException
  location: class Main
4 errors
Language: Java

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package march17;

/**
 *
 * @author Daffodil
 */
public class Factorial {

    public static void main(String[] args) {
        int a = 5;
        int fact = 1;
        for (int i = 1; i <= 5; i++) {
            fact = (fact * i);
        }

        System.out.println("Fact=" + fact);
    }
}

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

#include<stdio.h>
long long int jou(long long int n);
int main(){
  long long int n;
  scanf("%lld",&n);
  printf("%lld\n",jou(n));
  return 0;
}

int jou(int n){
  if(n == 1 || n == 0){
    return 1;
  }
  else{
    return(n*jou(n-1));
  }
}
    
  

Compiler output:
main.c:10:5: error: conflicting types for 'jou'; have 'int(int)'
   10 | int jou(int n){
      |     ^~~
main.c:2:15: note: previous declaration of 'jou' with type 'long long int(long long int)'
    2 | long long int jou(long long int n);
      |               ^~~
Language: C

#include<stdio.h>
main(){
  int n,j=1;
  scanf("%d",&n);
  for(i=2;i<=n;i++){
    j = j*i;
  }
  printf("%d\n",j);
  return 0;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:5:7: error: 'i' undeclared (first use in this function)
    5 |   for(i=2;i<=n;i++){
      |       ^
main.c:5:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void)
{
	int n;
	__int64 f = 1;;
	
	scanf("%d", &n);
	
	while (n > 1){
		f *= n;
		n--;
	}
	
	printf("%I64d\n", f);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: unknown type name '__int64'; did you mean '__int64_t'?
    6 |         __int64 f = 1;;
      |         ^~~~~~~
      |         __int64_t
Language: C

#include<stdio.h>

int f(int x){
  
  if( x == 0 || x == 1)
    return 1;

  return  x * f(x-1);
}

  int main(void){
    int n;

    scanf("%d",&n);

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

    return 0;
  }
    scanf("%d",&n);

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

    return 0;
  }

Compiler output:
main.c:20:11: error: expected declaration specifiers or '...' before string constant
   20 |     scanf("%d",&n);
      |           ^~~~
main.c:20:16: error: expected declaration specifiers or '...' before '&' token
   20 |     scanf("%d",&n);
      |                ^
main.c:22:12: error: expected declaration specifiers or '...' before string constant
   22 |     printf("%d\n",f(n));
      |            ^~~~~~
main.c:22:19: error: expected declaration specifiers or '...' before 'f'
   22 |     printf("%d\n",f(n));
      |                   ^
main.c:24:5: error: expected identifier or '(' before 'return'
   24 |     return 0;
      |     ^~~~~~
main.c:25:3: error: expected identifier or '(' before '}' token
   25 |   }
      |   ^
Language: C

#include <stdio.h>

int main(void){
int n,t,a=1;
scanf("%d",&n);
for(t=2;t<=n;t++){
     a = a*t
}
printf("%d",a);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:13: error: expected ';' before '}' token
    7 |      a = a*t
      |             ^
      |             ;
    8 | }
      | ~