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

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

struct UnionFind {
  vector<long> islandLinks;
  
  UnionFind(int n) : islandLinks(n, -1) {}
  
  int root(int x) {
    if(islandLinks[x] < 0) return x;
    return root(islandLinks[x]);
  }
  
  bool isSame(int x, int y) {
    if(root(x) == root(y)) return true;
    return false;
  }
  
  bool merage(int x, int y) {
    if(root(x) == root(y)) return false;
    
    if(root(x) > root(y)) swap(x, y);
    islandLinks[root(x)] += islandLinks[root(y)];
    islandLinks[root(y)] = x;
    return true;
  }
  
  long size(int x) {
    return -islandLinks[root(x)];
  }
};

int main() {
  int N, M;
  cin >> N >> M;
  vector<int> A(M), B(M);
  
  for(int i = 0; i < M; i++){
    cin >> A[i] >> B[i];
  }
  
  long count = N*(N-1) * 0.5; 
  vector<long> weights;
  
  UnionFind uf(N);
  for(int i = 0; i < M; i++) {
    weights.push_back(count);
    
    if(uf.isSame(A[N-1-i], B[N-1-i])) continue;
    
    long sa = uf.size(A[N-1-i]), sb = uf.size(B[N-1-i]);
    count -= sa*sb;
    
    uf.merage(A[N-1-i],B[N-1-i]);
  }
  
  vector<long>::reverse_iterator iter = weights.rbegin();
  while(iter != weights.rend()) {
    cout << *iter << endl;
    iter++;
  }

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

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

struct UnionFind {
  vector<long> islandLinks;
  
  UnionFind(int n) : islandLinks(n, -1) {}
  
  int root(int x) {
    if(islandLinks[x] < 0) return x;
    return root(islandLinks[x]);
  }
  
  bool isSame(int x, int y) {
    if(root(x) == root(y)) return true;
    return false;
  }
  
  bool merage(int x, int y) {
    if(root(x) == root(y)) return false;
    
    if(root(x) > root(y)) swap(x, y);
    islandLinks[root(x)] += islandLinks[root(y)];
    islandLinks[root(y)] = x;
    return true;
  }
  
  long size(int x) {
    return -islandLinks[root(x)];
  }
};

int main() {
  int N, M;
  cin >> N >> M;
  vector<int> A(M), B(M);
  
  for(int i = 0; i < M; i++){
    cin >> A[i] >> B[i];
  }
  
  long count = N*(N-1) * 0.5; 
  vector<long> weights;
  
  UnionFind uf(N);
  for(int i = 0; i < M; i++) {
    weights.push_back(count);
    
    if(uf.isSame(A[N-1-i], B[N-1-i])) continue;
    
    long sa = uf.size(A[N-1-i]), sb = uf.size(B[N-1-i]);
    count -= sa*sb;
    
    uf.merage(A[N-1-i],B[N-1-i]);
  }
  
  iterator<long>::iterator iter = weights.rbegin();
  while(iter != weights.rend()) {
    cout << *iter << endl;
    iter++;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:60:3: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   60 |   iterator<long>::iterator iter = weights.rbegin();
      |   ^~~~~~~~
In file included from /usr/include/c++/14/bits/stl_iterator_base_funcs.h:66,
                 from /usr/include/c++/14/string:47,
                 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_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
a.cc:60:16: error: wrong number of template arguments (1, should be at least 2)
   60 |   iterator<long>::iterator iter = weights.rbegin();
      |                ^
/usr/include/c++/14/bits/stl_iterator_base_types.h:127:34: note: provided for 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator'
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
a.cc:60:28: error: expected initializer before 'iter'
   60 |   iterator<long>::iterator iter = weights.rbegin();
      |                            ^~~~
a.cc:61:9: error: 'iter' was not declared in this scope
   61 |   while(iter != weights.rend()) {
      |         ^~~~
a.cc:64:4: error: expected '}' at end of input
   64 |   }
      |    ^
a.cc:36:12: note: to match this '{'
   36 | int main() {
      |            ^
Language: C++

include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b,c,sum,i=0;
  cin>>a>>b>>c;
  sum=a;
  if(b>=a*c){
    cout<<c<<"\n";
  }
  else{
    while(sum<=b){
      sum+=a;
      i++;
    }
    cout<<i<<"\n";
  }
  return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>a>>b>>c;
      |   ^~~
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout<<c<<"\n";
      |     ^~~~
a.cc:16:5: error: 'cout' was not declared in this scope
   16 |     cout<<i<<"\n";
      |     ^~~~
Language: C++

#include <iosream>

using std::cin;

int main(){
  int a,b,c;
  cin>>a;cin>>b;cin>>c;
  int max_buy = b/a;
  std::cout<<(max_buy>c?c:max_buy);
  return 0;
}

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

#include<stdio.h>
using namespace std;
int main(){
  int A, B, C;
  cin >> A >> B >> C;
  int listen_max = B / A;
  if (listen_max > C){
    cout << C << endl;
  }
  else{
    cout << listen_max << endl;
  }
}

Compiler output:
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:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << C << endl;
      |     ^~~~
a.cc:8:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:18: error: 'endl' was not declared in this scope
    8 |     cout << C << endl;
      |                  ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<stdio.h>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << listen_max << endl;
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:27: error: 'endl' was not declared in this scope
   11 |     cout << listen_max << endl;
      |                           ^~~~
a.cc:11:27: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<stdio.h>
using namespace std;
int main{
  int A, B, C;
  cin >> A >> B >> C;
  int listen_max = B / A;
  if (listen_max > C){
    cout << C << endl;
  }
  else{
    cout << listen_max << endl;
  }
}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:3: error: expected primary-expression before 'int'
    4 |   int A, B, C;
      |   ^~~
a.cc:4:3: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin >> A >> B >> C;
      |   ^~~
a.cc:6:20: error: 'B' was not declared in this scope
    6 |   int listen_max = B / A;
      |                    ^
a.cc:6:24: error: 'A' was not declared in this scope
    6 |   int listen_max = B / A;
      |                        ^
a.cc:7:3: error: expected unqualified-id before 'if'
    7 |   if (listen_max > C){
      |   ^~
a.cc:10:3: error: expected unqualified-id before 'else'
   10 |   else{
      |   ^~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int a,b,c,ans;
  cin >>a >>b >.c;
  if(b/a > c) ans = c;
  else ans = b/a;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected primary-expression before '.' token
    6 |   cin >>a >>b >.c;
      |                ^
Language: C++

#include "bits/stdc++/h"
using namespace std;

int main()
{
	int A, B, C;
	cin >> A >> B >> C;
	cout << (((B / A) > C) ? C : (B / A)) << endl;

	return 0;
}


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

#include "stdc++/h"
using namespace std;

int main()
{
	int A, B, C;
	cin >> A >> B >> C;
	cout << (((B / A) > C) ? C : (B / A)) << endl;

	return 0;
}


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

#include<iostram>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  int ans=b/a<c? b/a:c;
  cout<<ans;
  return 0;
}

Compiler output:
a.cc:1:9: fatal error: iostram: No such file or directory
    1 | #include<iostram>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int ans = b/a;
		if(ans > c) {
			ans = c;
		}
		System.out.println(ans);
		sc.close();
	}

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

#include<iostream>

int main(){
	int a,b,c,ans;
	cin >> a >> b >> c;
	ans = b/a;
	if(ans > c)cout << c;
	else cout << ans;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin >> a >> b >> 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:7:20: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         if(ans > c)cout << c;
      |                    ^~~~
      |                    std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         else cout << ans;
      |              ^~~~
      |              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<stdio.h>
int main ()
{
  int a,b,c,d;
  scanf("%d %d %d",&a,&b,&c);
  if(a=<b){
   d = b\a;
   d = c-d;
   d = c-d;
    printf("%d\n",d);
  }else{
    d = 0;
    printf("%d\n",d);
  }
  return 0;

Compiler output:
a.cc:7:9: error: stray '\' in program
    7 |    d = b\a;
      |         ^
a.cc: In function 'int main()':
a.cc:6:8: error: expected primary-expression before '<' token
    6 |   if(a=<b){
      |        ^
a.cc:7:9: error: expected ';' before 'a'
    7 |    d = b\a;
      |         ^~
      |         ;
a.cc:15:12: error: expected '}' at end of input
   15 |   return 0;
      |            ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: Java

import java.util.*;
public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int A=sc.nextInt();
		int B=sc.nextInt();
		int C=sc.nextInt();
      
       if(B/A>C) {
    	   System.out.println(C);
       }
       else {
		System.out.println(B/A);
       }
	}

}


Compiler output:
Main.java:2: 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)
Main.java:16: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.util.Scanner;

public class test{
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String[] split = sc.nextLine().split(" ");
		
		int A = Integer.parseInt(split[0]);
		int B = Integer.parseInt(split[1]);
		int C = Integer.parseInt(split[2]);
		
		int count = 0;
		
		for(int i = A; i <= B; i+=A) {
			if(count < C) count++;
		}
		
		System.out.println(count);
		
		sc.close();
	}
}

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

#include <iostream>

int main(){
    int a,b,c;
    cin >> a >> b >> c;
    if(b/a >= c){
        cout << c;
        return 0;
    }
    cout << b/a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin >> a >> b >> 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:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         cout << c;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     cout << b/a;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include ＜iostream＞
using namespace std;

int main(){
    int A, B, C, x;
    cin ＞＞ A ＞＞ B ＞＞ C;
    x = B / A;
    if(x＜C)
      cout ＜＜ x ＜＜ endl;
    else
      cout ＜＜ C ＜＜ endl;
    return 0;
}

Compiler output:
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include ＜iostream＞
      |          ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     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 ＜iostream＞
a.cc:8:8: error: 'x\U0000ff1cC' was not declared in this scope
    8 |     if(x＜C)
      |        ^~~~
a.cc:9:7: error: 'cout' was not declared in this scope
    9 |       cout ＜＜ x ＜＜ endl;
      |       ^~~~
a.cc:9:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:7: error: 'cout' was not declared in this scope
   11 |       cout ＜＜ C ＜＜ endl;
      |       ^~~~
a.cc:11:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

main(){scanf("%d%d%d",&a,&b,&c);printf("%d\n",(a/b<c?a/b:c));}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){scanf("%d%d%d",&a,&b,&c);printf("%d\n",(a/b<c?a/b:c));}
      | ^~~~
main.c: In function 'main':
main.c:1:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(){scanf("%d%d%d",&a,&b,&c);printf("%d\n",(a/b<c?a/b:c));}
      |        ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){scanf("%d%d%d",&a,&b,&c);printf("%d\n",(a/b<c?a/b:c));}
main.c:1:8: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(){scanf("%d%d%d",&a,&b,&c);printf("%d\n",(a/b<c?a/b:c));}
      |        ^~~~~
main.c:1:8: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:24: error: 'a' undeclared (first use in this function)
    1 | main(){scanf("%d%d%d",&a,&b,&c);printf("%d\n",(a/b<c?a/b:c));}
      |                        ^
main.c:1:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:27: error: 'b' undeclared (first use in this function)
    1 | main(){scanf("%d%d%d",&a,&b,&c);printf("%d\n",(a/b<c?a/b:c));}
      |                           ^
main.c:1:30: error: 'c' undeclared (first use in this function)
    1 | main(){scanf("%d%d%d",&a,&b,&c);printf("%d\n",(a/b<c?a/b:c));}
      |                              ^
main.c:1:33: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(){scanf("%d%d%d",&a,&b,&c);printf("%d\n",(a/b<c?a/b:c));}
      |                                 ^~~~~~
main.c:1:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:33: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:33: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include<bits/stdc++.h>
using naespace std;
int mian()
{
	int a,b,c;
	cin>>a>>b>>c;
	cout<<min(b/a,c);
	return 0;
 } 

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'naespace'
    2 | using naespace std;
      |       ^~~~~~~~
a.cc: In function 'int mian()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin>>a>>b>>c;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         cout<<min(b/a,c);
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:15: error: 'min' was not declared in this scope; did you mean 'std::min'?
    7 |         cout<<min(b/a,c);
      |               ^~~
      |               std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c;
  cin >> a >> b >> c;
  int count = 0;
  for(int i=0;i<c;i++) {
    b -= a;
    if(b >= 0) {
      count++;
    }
    else {
      break;
    }
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main(){
	int a,b,c;
	cin >> a >> b >> c;
 	int count = 0;
  	for(int i=0;i<c;i++){
    	b -= a;
    	if(b >= 0){
      	count++;
    	}
    	else{
     	break;
 	}
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int a,b,c;
  cin >> a >> b >> c;
  int count = 0;
  for(int i=0;i<c;i++) {
    b -= a;
    if(b >= 0) {
      count++;
    }
    else {
      break;
    }
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c;
  cin >> a >> b >> c;
  int count = 0;
  for(int i=0;i<c;i++) {
    b -= a;
    if(b >= 0) {
      count++;
    }
    else {
      break;
    }
  }

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

import java.util.*;

public class a
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        System.out.println((int)Math.min(b/a, c));
        in.close();
    }
}

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

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

Compiler output:
main.c:10:1: error: expected identifier or '(' before 'else'
   10 | else printf("0");
      | ^~~~
main.c:11:1: error: expected identifier or '(' before '}' token
   11 | }
      | ^
Language: C

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

Compiler output:
main.c:10:1: error: expected identifier or '(' before 'else'
   10 | else printf("0");
      | ^~~~
Language: C

include <stdio.h>
int main(){int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if(a*c>=b)printf("%d",c);
else printf("%d",b);
}

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

include <stdio.h>
int main(){
scanf("%d%d%d",&a,&b,&c);
if(a*c>=b)printf("%d",c);
else printf("%d",b);
}

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

// input macro 
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

fn main(){
    input!{
        a: usize,
        b: usize,
        c: usize,
    }
    println!("{}", std::cmp::min(b / a, c));
}

Compiler output:
a.cc:36:10: error: too many decimal points in number
   36 |         (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
      |          ^~~~~~~
a.cc:3:1: error: 'macro_rules' does not name a type
    3 | macro_rules! input {
      | ^~~~~~~~~~~
a.cc:20:1: error: 'macro_rules' does not name a type
   20 | macro_rules! input_inner {
      | ^~~~~~~~~~~
a.cc:30:1: error: 'macro_rules' does not name a type
   30 | macro_rules! read_value {
      | ^~~~~~~~~~~
a.cc:52:1: error: 'fn' does not name a type
   52 | fn main(){
      | ^~
Language: C++

#include<iostream>
#include<algorithm>

int main() {
    int A, B, C;
    cin >> A >> B >> C;
    int res;
    res = min(B / A, C);
    cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> A >> B >> 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:8:11: error: 'min' was not declared in this scope; did you mean 'std::min'?
    8 |     res = min(B / A, C);
      |           ^~~
      |           std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout << res << 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:9:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout << res << 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

($a,$b,$c)=(<>,<>,<>);print $c<$b/$a?$c:$b/$a;

Compiler output:
main.c:1:4: error: expected ')' before ',' token
    1 | ($a,$b,$c)=(<>,<>,<>);print $c<$b/$a?$c:$b/$a;
      |    ^
      |    )
main.c:1:23: error: unknown type name 'print'; did you mean 'int'?
    1 | ($a,$b,$c)=(<>,<>,<>);print $c<$b/$a?$c:$b/$a;
      |                       ^~~~~
      |                       int
main.c:1:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | ($a,$b,$c)=(<>,<>,<>);print $c<$b/$a?$c:$b/$a;
      |                               ^
Language: C++

#include "pch.h"
#include <iostream>
using namespace std;


int main()
{
	int a, b, c;
	cin >> a >> b >> c;
	if (b / a >= c) {
		cout << c << endl;
	}
	else {
		cout << b / a << endl;
	}
}

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

#include <bits/stdc++.h>


using namespace std;

#define endl '\n'
#define PB push_back
#define MP make_pair
#define LL long long
#define FOR(i,a,b) for(int i = (a); i <= (b); i++)
#define RE(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(int)(n)-1)
#define R(i,n) REP(i,n)
#define VI vector<int>
#define PII pair<int,int>
#define LD long double
#define FI first
#define SE second
#define st FI
#define nd SE
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())

int main() {

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout << setprecision(5);
    cout << fixed;

    int a, b, c;

    cin >> a >> b >> c;


    if(a > b) {

        cout << 0 << endl;
     
    }
    else if(b/a < c) {

        cout << b/a << endl;
    }

    else if(b/a => c){

        cout << c << endl;
    }


    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:46:18: error: expected primary-expression before '>' token
   46 |     else if(b/a => c){
      |                  ^
Language: C++

#include <iostream>

int main(){
    int A,B,C;
    cin>>A>>B>>C;
    int ans = C;
    ans = min(ans,B/A);
    cout<<ans<<endl;
}
#include <iostream>
using namespace std;

int main(){
    int A,B,C;
    cin>>A>>B>>C;
    int ans = C;
    ans = min(ans,B/A);
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin>>A>>B>>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:7:11: error: 'min' was not declared in this scope; did you mean 'std::min'?
    7 |     ans = min(ans,B/A);
      |           ^~~
      |           std::min
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:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout<<ans<<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:8:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout<<ans<<endl;
      |                ^~~~
      |                std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc: At global scope:
a.cc:13:5: error: redefinition of 'int main()'
   13 | int main(){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
Language: C++

#include <iostream>

int main(){
    int A,B,C;
    cin>>A>>B>>C;
    int ans = C;
    ans = min(ans,B/A);
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin>>A>>B>>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:7:11: error: 'min' was not declared in this scope; did you mean 'std::min'?
    7 |     ans = min(ans,B/A);
      |           ^~~
      |           std::min
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:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout<<ans<<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:8:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout<<ans<<endl;
      |                ^~~~
      |                std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
  int a, b, c;
  cin>>a>>b>>c;
  int d = (b/a);
  if(b>a){
    if(d>c){
      cout<<c;
    }
    else{
      cout<<d;
    }
  }
  else{
    cout<<0;
  }
  return 0;

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

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

int main(int argc, char const *argv[])
{	
	int a,b,c;
	cin >> a >> b >> c;
	cout << ((b / a < c) ? (b / a) ? c) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:8:43: error: expected ':' before ')' token
    8 |         cout << ((b / a < c) ? (b / a) ? c) << endl;
      |                                           ^
      |                                           :
a.cc:8:43: error: expected primary-expression before ')' token
a.cc:8:43: error: expected ':' before ')' token
    8 |         cout << ((b / a < c) ? (b / a) ? c) << endl;
      |                                           ^
      |                                           :
a.cc:8:43: error: expected primary-expression before ')' token
Language: C++

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

int main(){
	int a,b,c;
	cin>>a>>b>>c;
  	cout<< min(b/a,c)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected ';' before '}' token
    7 |         cout<< min(b/a,c)
      |                          ^
      |                          ;
    8 | }
      | ~
Language: C++

#include <iostream>
using namespace std;

int main() {
	char s[100010];
	scanf("%s", s);

	int a=0, b=0;
	for (int i = 0; i < strlen(s); i++) {
		if (s[i] == '0') a++;
		else b++;
	}

	cout << (a < b ? 2 * a : 2 * b) << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: 'strlen' was not declared in this scope
    9 |         for (int i = 0; i < strlen(s); i++) {
      |                             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: Java

import java.util.*;
public class Main{
public static void main(String[]args){
Scanner sc=new Scanner(System.in);
  String po=sc.next();
  int length=po.length();
  String p=po.replace("1","");
  po=po.replace("0","");
  System.out.println(Math.min(p.length()),po.length()))*2);
}
}


Compiler output:
Main.java:9: error: ';' expected
  System.out.println(Math.min(p.length()),po.length()))*2);
                                                      ^
1 error
Language: Java

import java.util.Scanner;

public class AFavoriteSound {
	public static void main(String[] args) {
		// 入力値を取得
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		// 満足度満たすか否か
		int smile = 0;
		smile = b >= a * c ? c : b / a;
		// 出力
		System.out.println(smile);
		// クローズ
		sc.close();
	}

}

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

import java.util.Scanner;

public class favoriteSound {
	public static void main(String[] args) {
		// 入力値を取得
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		// 満足度満たすか否か
		int smile = 0;
		smile = b >= a * c ? c : b / a;
		// 出力
		System.out.println(smile);
		// クローズ
		sc.close();
	}

}

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

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

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

#include "stdio"
using namespace std;
int main(){
  int a,b,c;
  cin>>a;
  cin>>b;
  cin>>c;
  cout<<a*c<b?b:b/a;
  return 0;
}

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

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

int main() {
  string str;
  int m = 0;
  int n = 0;

  cin >> str;

  for(int i=0;i<str.size();i++) {
    if (str.at(i) === "1") {
      m += 1;
    } else {
      n += 1;
    }
  }

  if (m < n) {
    cout << m * 2 << endl;
  } else {
    cout << n * 2 << endl;
  }
}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | 
    4 | int main() {
      | ~~~                 
a.cc: In function 'int main()':
a.cc:12:21: error: expected primary-expression before '=' token
   12 |     if (str.at(i) === "1") {
      |                     ^
Language: C++

#include "stdio"
int main(){
  int a,b,c;
  cin>>a;
  cin>>b;
  cin>>c;
  cout<<a*c<b?b:b/a;
  return 0;
}

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

#include <stdio.h>

int main(){
  char S[10000];
  
  scanf("%s", S);
  
  int n = 1;
  char cmp;
  int  count1 = 0;
  int count0 = 0;
  int i=0;
  while(S[i+1] != '\0'){
    if(S[i] == '1')
		count1++;
    else
      count0++;
  }
  int ans;
  if(count1 > = count0)
    ans = count1 - count0;
  else
    ans = count0 - count1;
  
  printf("%d",ans*2);
  
return 0;  
}


Compiler output:
main.c: In function 'main':
main.c:20:15: error: expected expression before '=' token
   20 |   if(count1 > = count0)
      |               ^
Language: C

#include <stdio.h>

int main(){
  char S[10000]
  scanf("%s", S);
  
  int n = 1;
  char cmp;
  int  count1 = 0;
  int count0 = 0;
  int i=0;
  while(S[i+1] != '\0'){
    if(S[i] == '1')
		count1++;
    else
      count0++;
  }
  int ans;
  if(count1 >= count0)
    ans = count1 - count0;
  else
    ans = count0 - count1;
  
  printf("%d",ans*2);
  
return 0;  
}


Compiler output:
main.c: In function 'main':
main.c:5:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    5 |   scanf("%s", S);
      |   ^~~~~
main.c:5:15: error: 'S' undeclared (first use in this function)
    5 |   scanf("%s", S);
      |               ^
main.c:5:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){
  char S[10000];
 
  scanf("%s", &S);
  
  int n = 1;
  char cmp;
  int  count1 = 0;
  int count0 = 0;
  int i=0;
  while(S[i+1] != '\0'){
    if(S[i] == '1')
		count1++;
    else
      count0++;
  }
  int ans;
  if(count1 > = count0)
    ans = count1 - count0;
  else
    ans = count0 - count1;
  
  printf("%d",ans*2);
  
return 0;  
}


Compiler output:
main.c: In function 'main':
main.c:20:15: error: expected expression before '=' token
   20 |   if(count1 > = count0)
      |               ^
Language: Java


class TestClass {
    public static void main(String args[] ) throws Exception {
        
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String name = br.readLine();                // Reading input from STDIN
        String []n=name.split(" ");
      	int a=Integer.parseInt(n[0]);
      	int b=Integer.parseInt(n[1]);
      	int c=Integer.parseInt(n[2]);
      	int count=0;
      	if(a=<b){
      	for(int i=0;i<c;i++){
        	if(a=<b){
            b=b-a;
              count++;
            }
        }
          System.out.println(count);
       }
      else{
      System.out.println("0");
      }
    }
       }

Compiler output:
Main.java:12: error: > or ',' expected
      	if(a=<b){
      	       ^
Main.java:14: error: > or ',' expected
        	if(a=<b){
        	       ^
2 errors
Language: C++

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

int main()
{
  int A, B, C;
  cin >> A >> B >> C;
  int count = B / A;
  if ( count > C )
    cout << C;
  else
    cout << count;
}

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

#include<stdio.h>

int main(void)
{
 int ok[100];
 int ka[100];
 int ao[100];
 int aw[100];
 int a,b,k;
 scanf("%d",&a);
 scanf("%d",&b);
 scanf("%d",&k);
 if(scanf("%d/%d", &numerator, &denominator) < 2) {
    fprintf(stderr, "error: ill-formed fraction.\n");
    exit(1);  
}
 for(int i=0;i<100;i++){
   int s=1;
   ok[i]=s;
    if(a%ok[i]==0){
     int f=0;
     ka[f]=ok[i];
     ++f;
      }
    if(b%ok[i]==0){
     int f=0;
     ao[f]=ok[i];
     ++f;
     }
   ++s;
 }
 for(int f=0;f<100;f++){
   if(ok[f]==ao[f]){
     int c=0;
     aw[c]=ao[f];
     ++c;
     }
 }
printf("%d",aw[k]);
return 0;
 }





Compiler output:
main.c: In function 'main':
main.c:13:21: error: 'numerator' undeclared (first use in this function)
   13 |  if(scanf("%d/%d", &numerator, &denominator) < 2) {
      |                     ^~~~~~~~~
main.c:13:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:33: error: 'denominator' undeclared (first use in this function)
   13 |  if(scanf("%d/%d", &numerator, &denominator) < 2) {
      |                                 ^~~~~~~~~~~
main.c:15:5: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   15 |     exit(1);
      |     ^~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:15:5: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   15 |     exit(1);
      |     ^~~~
main.c:15:5: note: include '<stdlib.h>' or provide a declaration of 'exit'
Language: C++

#include<iostream>
using namespace std;

int main(){
  int A,B,C,D;
  cin >> A >> B >> C;
  int D = B/A;
  if(D>=C){
    cout << C <<endl;
  }else if(D<C){
    cout << D <<endl;
  }
   
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: redeclaration of 'int D'
    7 |   int D = B/A;
      |       ^
a.cc:5:13: note: 'int D' previously declared here
    5 |   int A,B,C,D;
      |             ^
Language: C++

#include <iostream>

using namespace std;

int main(){
    int a,b,c;
    cin >> a >> b >> c;
    if(a>b) return 0;
    else if (a*c<=b) return c;
    else return floor(b/double(a));

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'floor' was not declared in this scope
   10 |     else return floor(b/double(a));
      |                 ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int A,B,C,D;
  cin >> A >> B >> C;
  B/A = D;
  if(D>=C){
    cout << C <<endl;
  }else if(D<C){
    cout << D <<endl;
  }
   
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:4: error: lvalue required as left operand of assignment
    7 |   B/A = D;
      |   ~^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,c;
	scanf("%d %d %d",&*a,&b,&c);
	if(b/a<c)
		printf("%d",b/a);
	else
		printf("%d",c);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:27: error: invalid type argument of unary '*' (have 'int')
    6 |         scanf("%d %d %d",&*a,&b,&c);
      |                           ^~
Language: C

#include <stdio.h>

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

    scanf ("%d%d%d", &a, &b, &c);
    if ((a * c) <= b){
        printf("%d", c);
    } 
    else {
        printf("%d", (b / a));
    }
    
    retuen (0);
}

Compiler output:
main.c: In function 'main':
main.c:15:5: error: implicit declaration of function 'retuen' [-Wimplicit-function-declaration]
   15 |     retuen (0);
      |     ^~~~~~
Language: C

#include<stdio.h>

int main(void)
{
	int a,b,c;
	
	scanf("%d %d %d",&a,&b,&c);
	
	int x;
	
	x = b / a;
	
	if(x >= c){
		printf("%d\n",c);
	}
	
	else{
		printf("%d\n",x)+
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:9: error: expected expression before '}' token
   19 |         }
      |         ^
Language: C++

#include <iostream>
using namespace std;

void func(int,int,int);
void swap(int&,int&);
int euclidean(int,int);

int main(){
    int a,b,c;
    cin >> a >> b >> c;
    func(a,b,c);
    
    return 0;
}

void func(int a,int b,int c){
    int n = euclidean(a,b);
    //cout << n << "\n";
    if(c==1){
        cout << n << "\n";
        return 0;
    } 
    if(n == 1) {
        cout << 1 << "\n";
        return;
    }
    //cout << n << "\n";
    int count = 1;
    for(int i = n-1;; i--)
    {
        if(i == 0){
            cout << 1 << "\n";
            return;
        }
        if(n%i==0){
            //cout << i << "\n";
            count++;
            if(count == c) {
                cout << i << "\n";
                return;
            }
        }
    }
}

int euclidean(int a,int b){
    if(a<b) swap(a,b);
    int r;
    while((r=a%b)!=0){
        if(r==1) return 1;
        //cout << a << "," << b << "," << r << "," << "\n" ;
        a = b;b = r;
    }
    return b;
}

void swap(int& a,int& b){
    int tmp = a;
    a = b;b = tmp;
}

Compiler output:
a.cc: In function 'void func(int, int, int)':
a.cc:21:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   21 |         return 0;
      |                ^
Language: C++

#include<iostream>
using namespace std;
long long n,m,ans;
long long u[100001],v[100001];
long long f[100001],a[100001];
long long k[100001];
long long findk(long long x)
{
    if(f[x]==x)return k[x];
    return k[x]=findk(f[x]);
}
long long find(long long x)
{
    if(f[x]==x)return x;
    return f[x]=find(f[x]);
}
long long main()
{
    cin>>n>>m;
    for(long long i=1;i<=n;i++)f[i]=i,k[i]=1;
    ans=(n-1)*n/2;
    for(long long i=1;i<=m;i++)
    {
        cin>>u[i]>>v[i];
    }
    for(long long i=m;i>=1;i--)
    {
        a[i]=ans;
        if(find(u[i])==find(v[i]))continue; 
        ans-=k[find(u[i])]*k[find(v[i])];
        long long s=k[find(u[i])]+k[find(v[i])];
        k[find(u[i])]=s;
        k[find(v[i])]=s;
        f[find(u[i])]=f[find(v[i])];
    }
    for(long long i=1;i<=m;i++)
    {
        cout<<a[i]<<endl;
    }
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: Java

import java.util.*;
 
public class Main {
 
	public static void main(String[] args){
		Scanner sn = new Scanner(System.in);
ArrayList<Integer> list = new ArrayList<Integer>();
 

    String str = sn.nextLine();
      
String[] num = str.split(" ", 3);
      
		int A=num[0]/num[1];
		if(A>num[2]){
		    A=num[2];
		}
      System.out.println(A);

}
}

Compiler output:
Main.java:14: error: bad operand types for binary operator '/'
		int A=num[0]/num[1];
		            ^
  first type:  String
  second type: String
Main.java:15: error: bad operand types for binary operator '>'
		if(A>num[2]){
		    ^
  first type:  int
  second type: String
Main.java:16: error: incompatible types: String cannot be converted to int
		    A=num[2];
		         ^
3 errors
Language: C++

#include <cstdio>

int main(){
  int a, b, c;
  std::cin >> a >> b >> c;
  
  auto ans = b / c;
  
  return ans < c ? ans : c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'cin' is not a member of 'std'
    5 |   std::cin >> a >> b >> c;
      |        ^~~
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 |
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a;
  int b;
  int c;
  
  cin >> a >> b >> c;
 if (b >= a) {
  if (b/a < c) {
int k;
int s;
k=b%a;
s=b/a-k;
cout << s << endl;
               }   
  if (c <= b/a) {
    cout << c << endl;
                }
            }
else{
  cout << 0 << endl;
    }


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

#include <stdio.h>
int main(void){
  int A,B,C,x;
  scanf("%d",&A);
  scanf("%d",&B);
  scanf("%d",&C);
  x=B/A;
	if(x>C){
      printf("%d",C);}
	else{
      printf("%d",x);}
return 0;

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