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

import java.io.*;
import java.util.*;



public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
                    
        str = br.readLine();
        String[] line = str.split("\\s");
        int x = Integer.parseInt(line[0]);
        int y = Integer.parseInt(line[1]);
     
        int temp = 0;
        if(x > y){
            temp = y;
            y = x;
            x = temp;
        }

        temp = run(x,y);

        System.out.println(temp);
       
        br.close();
    }

    public static int run(int x,int y){
        if(m == 0){
            return x;
        }else{
            int m = y % x;
            return run(m,x);
        }
    }
}


Compiler output:
Main.java:31: error: cannot find symbol
        if(m == 0){
           ^
  symbol:   variable m
  location: class Main
1 error
Language: Java

import java.util.*;
import java.lang.*;

public class main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int n1 = sc.nextInt();
		int n2 = sc.nextInt();
		
		while (n1 != 0 && n2 != 0) {
			int temp = n2;
			n2 = n1;
			n1 = temp % n1;
		}
		
		System.out.println((n1==0)? n2:n1);
		
		
		
	}
}



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

import java.util.Scanner;

class Main {
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		long numbef = scanner.nextInt();//要素数
		long numaft = scanner.nextInt();//要素数
		
		
		//insertionSort(numbef, numaft);
		gcd_euclid(numbef, numaft);
		
		scanner.close();
	}
	
	public static void gcd_euclid(long numbef, long numaft) {
		  long sub;
		  while (0 != numaft) {
		  	//ユークリッドの互除法
		    sub = numbef % numaft; 
		  	numbef = numaft; 
		  	numaft = sub;
		  }
		  System.out.println(u);
		}
}




Compiler output:
Main.java:24: error: cannot find symbol
		  System.out.println(u);
		                     ^
  symbol:   variable u
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Gcd{
	public static void main(String[] args){
		Scanner s=new Scanner(System.in);
		int x=s.nextInt();
		int y=s.nextInt();
		int z=1;
		while(z!=0){
			z=x%y;
			x=y;
			y=z;
		}
		System.out.println(x);
	}
}


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

#include<stdio.h>

int minint(int a,int b);

int main(void){
	int x=0,y=0,min,i=1;
	int alfa=0;

	scanf("%d %d",&x,&y);

	min=minint(x,y);

	while(i<=min){
		if(x%i==0&&y%i==0){
			alfa=i;
		}
		i++;
	}
	printf("%d \n",alfa);

}

int minint(int a,int b){
	int minint;

	if(a<b){
		minint=a;
	}
	if(b<a){
		minint=b;
	}
	return minint;
}



Compiler output:
Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
        ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int main(void){
^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: <identifier> expected
int main(void){
             ^
Main.java:9: error: illegal start of expression
	scanf("%d %d",&x,&y);
	              ^
Main.java:9: error: illegal start of expression
	scanf("%d %d",&x,&y);
	                 ^
6 errors
Language: Java

/**
 * 
 */
package com.aizu;

import java.util.Scanner;

/**
 * @author Rancho
 *
 */
public class GCD {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String numStr = sc.nextLine();

		String[] numArr = numStr.split(" ");
		int[] arr = new int[numArr.length];

		for (int i = 0; i < numArr.length; i++) {
			arr[i] = Integer.parseInt(numArr[i]);
		}

		int gcd = 2;
		int min = 0;

		for (int i = 1; i < arr.length; i++) {
			for (int j = 0; j < arr.length - i; j++) {
				min = arr[j] < arr[j + 1] ? arr[j] : arr[j + 1];
			}
		}

		int count = 2;
		while (count <= min) {
			if (arr[0] % count == 0 && arr[1] % count == 0)
				gcd = count;
			count++;
		}

		System.out.println("GCD is : " + gcd);
		sc.close();
	}

}



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

/**
 * 
 */
package com.aizu;

import java.util.Scanner;

/**
 * @author Rancho
 *
 */
public class GCD {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String numStr = sc.nextLine();

		String[] numArr = numStr.split(" ");
		int[] arr = new int[numArr.length];

		for (int i = 0; i < numArr.length; i++) {
			arr[i] = Integer.parseInt(numArr[i]);
		}

		int gcd = 2;
		int min = 0;

		for (int i = 1; i < arr.length; i++) {
			for (int j = 0; j < arr.length - i; j++) {
				min = arr[j] < arr[j + 1] ? arr[j] : arr[j + 1];
			}
		}

		int count = 2;
		while (count <= min) {
			if (arr[0] % count == 0 && arr[1] % count == 0)
				gcd = count;
			count++;
		}

		System.out.println(gcd);
		sc.close();
	}

}



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

#include <stdio.h>

int main(){
  int a,b,rem,tmp;
  scanf("%d %d",&a,&b);
  if(a<b){
    tmp = a;
    a = b;
    b = tmp;
  }
  while(rem!=0){
    rem = a%b;
    a = b;
    b = rem;
  }
  printf("%d",a);
}



Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:5: error: class, interface, enum, or record expected
  scanf("%d %d",&a,&b);
  ^
Main.java:6: error: class, interface, enum, or record expected
  if(a<b){
  ^
Main.java:8: error: class, interface, enum, or record expected
    a = b;
    ^
Main.java:9: error: class, interface, enum, or record expected
    b = tmp;
    ^
Main.java:10: error: class, interface, enum, or record expected
  }
  ^
Main.java:13: error: class, interface, enum, or record expected
    a = b;
    ^
Main.java:14: error: class, interface, enum, or record expected
    b = rem;
    ^
Main.java:15: error: class, interface, enum, or record expected
  }
  ^
Main.java:17: error: class, interface, enum, or record expected
}
^
11 errors
Language: Java

#include <stdio.h>

int main(){
  int x, y;
  int r;
  scanf("%d%d",&x,&y);
  while(0!=y){
    r=x%y;
    x=y;
    y=r;
  }
  printf("%d\n",x);
  return 0;
}



Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
  int r;
  ^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: class, interface, enum, or record expected
  scanf("%d%d",&x,&y);
  ^
Main.java:7: error: class, interface, enum, or record expected
  while(0!=y){
  ^
Main.java:9: error: class, interface, enum, or record expected
    x=y;
    ^
Main.java:10: error: class, interface, enum, or record expected
    y=r;
    ^
Main.java:11: error: class, interface, enum, or record expected
  }
  ^
Main.java:13: error: class, interface, enum, or record expected
  return 0;
  ^
Main.java:14: error: class, interface, enum, or record expected
}
^
10 errors
Language: Java

#include <stdio.h>

int main(){
  int a,b,rem,tmp;
  scanf("%d %d",&a,&b);
  if(a<b){
    tmp = a;
    a = b;
    b = tmp;
  }
  while(rem!=0){
    rem = a%b;
    a = b;
    b = rem;
  }
  printf("%d\n",a);

  return 0;
}



Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:5: error: class, interface, enum, or record expected
  scanf("%d %d",&a,&b);
  ^
Main.java:6: error: class, interface, enum, or record expected
  if(a<b){
  ^
Main.java:8: error: class, interface, enum, or record expected
    a = b;
    ^
Main.java:9: error: class, interface, enum, or record expected
    b = tmp;
    ^
Main.java:10: error: class, interface, enum, or record expected
  }
  ^
Main.java:13: error: class, interface, enum, or record expected
    a = b;
    ^
Main.java:14: error: class, interface, enum, or record expected
    b = rem;
    ^
Main.java:15: error: class, interface, enum, or record expected
  }
  ^
Main.java:18: error: class, interface, enum, or record expected
  return 0;
  ^
Main.java:19: error: class, interface, enum, or record expected
}
^
12 errors
Language: Java

import java.util.Scanner;

public class main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int y = sc.nextInt();
		int tmp;
		
		if (x<=y) {
			tmp = x;
			x = y;
			y = tmp;
		}
		
		while (y > 0) {
			x = x % y;
			tmp = x;
			x = y;
			y = tmp;
		}
		
		System.out.println(x);
		
	}
}


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

import java.util.Scanner;
public class p1_2{
    public static void main(String[] args){
	int a,b,rem;
	Scanner scan =new Scanner(System.in);
	a=scan.nextInt();
	b=scan.nextInt();
	rem=a%b;
        while(rem!=0){
	    a=b;
	    b=rem;
	    rem=a%b;
	}
	System.out.println(b);
    }
}


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

package ex1;
import java.util.Scanner;
public class GreatestCommonDivisor {
public static void main(String[] args){
	int z;
	Scanner scanner=new Scanner(System.in);
	int x = scanner.nextInt();
	int y = scanner.nextInt();
	while(true){
		z=x%y;
		if(z==0){
			System.out.println(y);
			break;
		}
		else{
			x=y;
			y=z;
		}
	}
}
}



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

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

  int x,y,r;

  scanf("%d%d",&x,&y);
  while(x%y!=0){
    r=x%y;
    x=y;
    y=r;
  }
  printf("%d\n",r);
  return 0;
}



Compiler output:
Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
        ^
Main.java:6: error: class, interface, enum, or record expected
  scanf("%d%d",&x,&y);
  ^
Main.java:7: error: class, interface, enum, or record expected
  while(x%y!=0){
  ^
Main.java:9: error: class, interface, enum, or record expected
    x=y;
    ^
Main.java:10: error: class, interface, enum, or record expected
    y=r;
    ^
Main.java:11: error: class, interface, enum, or record expected
  }
  ^
Main.java:13: error: class, interface, enum, or record expected
  return 0;
  ^
Main.java:14: error: class, interface, enum, or record expected
}
^
9 errors
Language: Java

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

  int num1,num2;
  int kouho[100];
  int i,j,count = 0;

  scanf("%d %d",&num1,&num2);
  
  if(num1 < num2){
    for(i = 2;i<=num1;i++){
      if(num1 % i == 0){
	kouho[count] = i;
	count++;
	  }
    }
    for(j = count;j>=0;j--){
      if(num2 % kouho[j] == 0){
	printf("%d\n",kouho[j]);
	break;
      }
    }
  }
  else if(num2 < num1){
    for(i = 2;i<=num2;i++){
      if(num2 % i == 0){
	kouho[count] = i;

	count++;
	  }
    }
    for(j = count; j>= 0;j--){
      if(num1 % kouho[j] == 0){
	printf("%d\n",kouho[j]);
	  break;
      }
    }
  }
  else if(num2 == num1){
    printf("%d\n",num2);
  }
  else{
    printf("error!");
  }
  return 0;
}
  



Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:5: error: class, interface, enum, or record expected
  int kouho[100];
  ^
Main.java:6: error: class, interface, enum, or record expected
  int i,j,count = 0;
  ^
Main.java:8: error: class, interface, enum, or record expected
  scanf("%d %d",&num1,&num2);
  ^
Main.java:10: error: class, interface, enum, or record expected
  if(num1 < num2){
  ^
Main.java:11: error: class, interface, enum, or record expected
    for(i = 2;i<=num1;i++){
              ^
Main.java:11: error: class, interface, enum, or record expected
    for(i = 2;i<=num1;i++){
                      ^
Main.java:14: error: class, interface, enum, or record expected
	count++;
	^
Main.java:15: error: class, interface, enum, or record expected
	  }
	  ^
Main.java:17: error: class, interface, enum, or record expected
    for(j = count;j>=0;j--){
                  ^
Main.java:17: error: class, interface, enum, or record expected
    for(j = count;j>=0;j--){
                       ^
Main.java:20: error: class, interface, enum, or record expected
	break;
	^
Main.java:21: error: class, interface, enum, or record expected
      }
      ^
Main.java:25: error: class, interface, enum, or record expected
    for(i = 2;i<=num2;i++){
              ^
Main.java:25: error: class, interface, enum, or record expected
    for(i = 2;i<=num2;i++){
                      ^
Main.java:29: error: class, interface, enum, or record expected
	count++;
	^
Main.java:30: error: class, interface, enum, or record expected
	  }
	  ^
Main.java:32: error: class, interface, enum, or record expected
    for(j = count; j>= 0;j--){
                   ^
Main.java:32: error: class, interface, enum, or record expected
    for(j = count; j>= 0;j--){
                         ^
Main.java:35: error: class, interface, enum, or record expected
	  break;
	  ^
Main.java:36: error: class, interface, enum, or record expected
      }
      ^
Main.java:41: error: class, interface, enum, or record expected
  }
  ^
Main.java:44: error: class, interface, enum, or record expected
  }
  ^
Main.java:46: error: class, interface, enum, or record expected
}
^
25 errors
Language: Java

import java.util.Scanner;

public class GCD {

	public static void main(String[] args) {

		Scanner x  = new Scanner(System.in);
		int a = x.nextInt();
		int b = x.nextInt();// image a > b;
		int r;

		while(true) {
		r = a % b;
		if(r==0)break;
		a = b;	
		b = r;

		}
		System.out.println(b);


}
}


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


import java.util.Scanner;
public class Sort {

	public static void main(String[] args) {
		Scanner x = new Scanner(System.in);
				int n=x.nextInt();
		int[] a = new int [n];
		for(int i=0;i<a.length;i++) {
			a[i] = x.nextInt();
			System.out.print(a[i]);
			if(i < a.length -1) {
				System.out.print(" ");
			}
		}
		System.out.println();

		for(int i=1;i<a.length;i++) {
			int v = a[i];
			int j = i - 1;
			while( (j >= 0) && a[j] > v) {
				a[j+1] = a[j];
				j--;
				a[j+1] = v;
			}

			for(int k=0;k<a.length;k++) {
				System.out.print(a[k]);
				if(k < a.length - 1) {
					System.out.print(" ");
				}
				if(k == a.length - 1) {
					System.out.println();
				}
			}
		}
	}}



Compiler output:
Main.java:3: 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 B{
    public static void main(String[] args){
        int n = 1;
        Scanner a = new Scanner(System.in);
        int x = a.nextInt();
        int y = a.nextInt();
        if(x > y){
            for(int i=1; i <= y/2; i++){
                if(x%i == 0 && y%i == 0){
                    n = i;
                }
            }
        }
        else{
            for(int i = 1; i <= x/2; i++){
                if(x%i == 0 && y%i == 0){
                    n = i;                
               }
            }       
        }
        System.out.println(n);
    }
}


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

import java.util.*;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		
		while( a != b ){
			if( a < b ){
				b %= a;
			} else if( a > b ){
				a %= b;
			}
		}
		
		System.out.println(a);
	}

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

import java.util.Scanner;
public class GreatestCommonDivisor {
	static int gcd(int a,int b){
		if(b==0){
			return a;
		}else{
			return gcd(b,a%b);
		}
	}
	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		int b=scan.nextInt();
		System.out.println(gcd(Math.max(a,b),Math.min(a,b)));
		scan.close();
	}
}

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

#include <stdio.h>

#define MAX 1000000

int main()
{
    int i;
    int str[MAX]
    for( i=0; i<MAX; i++ )
    {
        str[i]=i;
    }
    printf("%d\n",i);

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
    9 |     for( i=0; i<MAX; i++ )
      |     ^~~
main.c:11:9: error: 'str' undeclared (first use in this function)
   11 |         str[i]=i;
      |         ^~~
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

 int gcd(int x,int y){return (y==0?x:gcd(y:x%y));}


 int main(){
            int x,y;
            scanf("%d%d",&x,&y);
            printf("%d\n",gcd(x,y));
            return 0;
            }


Compiler output:
main.c: In function 'gcd':
main.c:3:43: error: expected ')' before ':' token
    3 |  int gcd(int x,int y){return (y==0?x:gcd(y:x%y));}
      |                                         ~ ^
      |                                           )
main.c:3:38: error: too few arguments to function 'gcd'
    3 |  int gcd(int x,int y){return (y==0?x:gcd(y:x%y));}
      |                                      ^~~
main.c:3:6: note: declared here
    3 |  int gcd(int x,int y){return (y==0?x:gcd(y:x%y));}
      |      ^~~
Language: C

#include<stdio.h>

 int gcd(int x,int y){return x(y==0?x:gcd(y:x%y));}


 int main(){
            int x,y;
            scanf("%d%d",&x,&y);
            printf("%d\n",gcd(x,y));
            return 0;
            }


Compiler output:
main.c: In function 'gcd':
main.c:3:44: error: expected ')' before ':' token
    3 |  int gcd(int x,int y){return x(y==0?x:gcd(y:x%y));}
      |                                          ~ ^
      |                                            )
main.c:3:39: error: too few arguments to function 'gcd'
    3 |  int gcd(int x,int y){return x(y==0?x:gcd(y:x%y));}
      |                                       ^~~
main.c:3:6: note: declared here
    3 |  int gcd(int x,int y){return x(y==0?x:gcd(y:x%y));}
      |      ^~~
main.c:3:30: error: called object 'x' is not a function or function pointer
    3 |  int gcd(int x,int y){return x(y==0?x:gcd(y:x%y));}
      |                              ^
main.c:3:14: note: declared here
    3 |  int gcd(int x,int y){return x(y==0?x:gcd(y:x%y));}
      |          ~~~~^
Language: C

#include <stdio.h>

main(){
   int x, y, c;

   scanf("%d %d", &x, &y);

   if (a < b){
      c = a;
      a = b;
      b = c;
   }

   while (a % b != 0){
      c = a % b;
      a = b;
      b = c;
   }

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

   return 0;
}


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:8:8: error: 'a' undeclared (first use in this function)
    8 |    if (a < b){
      |        ^
main.c:8:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:12: error: 'b' undeclared (first use in this function)
    8 |    if (a < b){
      |            ^
Language: C

#include<stdio.h>
int main(void) {
  intlonger a, b;
  int c, d=1, i;
  scanf("%d %d",&a, &b);
  a < b ? (c = a):(c = b);
  for(i = 1; i < c+1 ;i++) {
    if(a%i == 0 && b%i == 0) {
      d = i;
    }
  }
  printf("%d\n",d);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:3:3: error: unknown type name 'intlonger'
    3 |   intlonger a, b;
      |   ^~~~~~~~~
Language: C

#include<stdio.h>
int main(void) {
  int a, b, c, d=1, i;
  scanf("%d %d",&a, &b);
  if(a == b) {
    d = a;
  } else {
    a>b ? (c = b):(c = a);
    for(i = c; i > c/2-1; i--) {
      if(a%i == 0 && b%i == 0) {
        d = i;
        break;
    }
  }
  printf("%d\n",d);
  return 0;
}



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

#include <stdio.h>

int main () {

    int x, y, d, i, b;

    scanf("%d", &x); scanf("%d", &y);

    if (x > y) {
        b = x;
    } else {
        b = y;
    }

    for (i = b; i > 0; i--) {
        if (x % i == 0; y % i == 0) {
            d = i;
        }
    }

    printf("%d", d);

     return 0;

}



Compiler output:
main.c: In function 'main':
main.c:16:23: error: expected ')' before ';' token
   16 |         if (x % i == 0; y % i == 0) {
      |            ~          ^
      |                       )
Language: C

#include<stdio.h>

int main(void){
    int x, y, c, surplus;
    
    scanf("%d %d",&x &y);
    
    if(x < y){
        c = x;
        x = y;
        y = c;
    }
    
    while(1){
        surplus = x % y;
        if(surplus == 0){
            break;
        }
        x = y;
        y = surplus;
    }
    
    printf("%d\n", y);
}


Compiler output:
main.c: In function 'main':
main.c:6:22: error: invalid operands to binary & (have 'int *' and 'int')
    6 |     scanf("%d %d",&x &y);
      |                   ~~ ^
      |                   |
      |                   int *
Language: C

#include<stdio.h>

int main(void){
  int i,j,k;
  scanf("%d %d",&i,&j);
  for (i=0;i<j;i++)


Compiler output:
main.c: In function 'main':
main.c:6:3: error: expected expression at end of input
    6 |   for (i=0;i<j;i++)
      |   ^~~
main.c:6:3: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>

int main(void) {

   int x, y, z, d;

   scanf("%d", &x);
   scanf("%d", &y);

   if (x < y) {
      z = x;
      x = y;
      y = z;
   }

   for (d = 1; d <= y; d++) {
     if (y % d == 0 && (x % y) % d == 0) {
       c = d;
     }

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

   return 0;
}



Compiler output:
main.c: In function 'main':
main.c:18:8: error: 'c' undeclared (first use in this function)
   18 |        c = d;
      |        ^
main.c:18:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: C

#include<stdio.h>

int main(void) {

   int x, y, z, d;

   scanf("%d", &x);
   scanf("%d", &y);

   if (x < y) {
      z = x;
      x = y;
      y = z;
   }

   for (d = 1; d <= y; d++) {
     if (y % d == 0 && (x % y) % d == 0) {
       c = d;
       printf ("%d\n", c);
     }
   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:8: error: 'c' undeclared (first use in this function)
   18 |        c = d;
      |        ^
main.c:18:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
Language: C

#include<stdio.h>

int main(void){
   int x,y;
   scanf("%d %d",&x,&y);

   if(x<y)
      swap(x,y);
   while(y>0){
      r=x%y;
      x=y;
      y=r;
   }
  return x
}


Compiler output:
main.c: In function 'main':
main.c:8:7: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
    8 |       swap(x,y);
      |       ^~~~
main.c:10:7: error: 'r' undeclared (first use in this function)
   10 |       r=x%y;
      |       ^
main.c:10:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:11: error: expected ';' before '}' token
   14 |   return x
      |           ^
      |           ;
   15 | }
      | ~
Language: C

#include<stdio.h>

int main(void){
   int x,y;
   scanf("%d %d",&x,&y);

   if(x<y)
      swap(x,y);
   while(y>0){
      r=x%y;
      x=y;
      y=r;
   }
  printf("%d",x);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:7: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
    8 |       swap(x,y);
      |       ^~~~
main.c:10:7: error: 'r' undeclared (first use in this function)
   10 |       r=x%y;
      |       ^
main.c:10:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){
   int x,y;
   scanf("%d %d",&x,&y);

   if(x<y){
      swap(x,y);
   }
   while(y>0){
      r=x%y;
      x=y;
      y=r;
   }
  printf("%d",x);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:7: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
    8 |       swap(x,y);
      |       ^~~~
main.c:11:7: error: 'r' undeclared (first use in this function)
   11 |       r=x%y;
      |       ^
main.c:11:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void) {

   int x, y, z, c, d;

   scanf("%d", &x);
   scanf("%d", &y);

   if (x < y) {
      z = x;
      x = y;
      y = z;
   }

   for (d = 1; d <= y; d++) {
     if (y % d == 0 && (x % y) % d == 0) {
       c = d;
     }

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

   return 0;
}



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

#include<stdio.h>

int main(void) {

   int x, y, z, d;
   int c = 0;

   scanf("%d", &x);
   scanf("%d", &y);

   if (x < y) {
      z = x;
      x = y;
      y = z;
   }

   for (d = 1; d <= y; d++) {
     if (y % d == 0 && (x % y) % d == 0 && c < d) {
       c = d;
     }

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

   return 0;
}



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

#include<stdio.h>
 
int main(void) {
 
   int x, y, z, d;
   int c = 0;
 
   scanf("%d", &x);
   scanf("%d", &y);
 
   if (x < y) {
      z = x;
      x = y;
      y = z;
   }
 
   for (d = 2; d <= y; d++) {
     if (y % d == 0 && (x % y) % d == 0 && c < d) {
       c = d;
     }
 
   printf ("%d\n", c);
 
   return 0;
}


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

#include<stdio.h>

int main(void){
   int x,y,r;
   scanf("%d %d",&x,&y);

   if(x<y){
    swap(x,y);
   }

   while(y>0){
      r=x%y;
      x=y;
      y=r;
   }
  printf("%d\n",x);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
    8 |     swap(x,y);
      |     ^~~~
Language: C

#include  <stdio.h>

int main(){

int x,y,t,c,k;

scanf("%d %d\n",&x,&y);

if(y>x){
 t = y;
 y = x;
 x = t;
}

c = x%y;

for(i=1;i<=y;i++){
 if(y%i==0 && x%i==0){
  k=i;
  }
}

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

return 0
}

  

 


Compiler output:
main.c: In function 'main':
main.c:17:5: error: 'i' undeclared (first use in this function)
   17 | for(i=1;i<=y;i++){
      |     ^
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:9: error: expected ';' before '}' token
   25 | return 0
      |         ^
      |         ;
   26 | }
      | ~
Language: C

#include  <stdio.h>

int main(){

int x,y,t,c,k;

scanf("%d %d\n",&x,&y);

if(y>x){
 t = y;
 y = x;
 x = t;
}
k = 0;
c = x%y;

for(i=1;i<=y;i++){
 if(y%i==0 && x%i==0){
  k = i;
  }
}

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

return 0
}

  

 


Compiler output:
main.c: In function 'main':
main.c:17:5: error: 'i' undeclared (first use in this function)
   17 | for(i=1;i<=y;i++){
      |     ^
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:9: error: expected ';' before '}' token
   25 | return 0
      |         ^
      |         ;
   26 | }
      | ~
Language: C

#include  <stdio.h>

int main(){

int x,y,t,c,k;

scanf("%d %d\n",&x,&y);

if(y>x){
 t = y;
 y = x;
 x = t;
}
k = 0;
c = x%y;

for(i=1;i<=y;i++){
 if((y%i==0) && (x%i==0)){
  k = i;
  }
}

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

return 0
}

  

 


Compiler output:
main.c: In function 'main':
main.c:17:5: error: 'i' undeclared (first use in this function)
   17 | for(i=1;i<=y;i++){
      |     ^
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:9: error: expected ';' before '}' token
   25 | return 0
      |         ^
      |         ;
   26 | }
      | ~
Language: C

#include <stdio.h>

int main(){

int x,y,t,c,k;

scanf("%d %d\n",&x,&y);

if(y>x){
 t = y;
 y = x;
 x = t;
}
k = 0;
c = x%y;

for(i=1;i<=y;i++){
 if((y%i==0) && (x%i==0)){
  k = i;
  }
}

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

return 0
}

  

 


Compiler output:
main.c: In function 'main':
main.c:17:5: error: 'i' undeclared (first use in this function)
   17 | for(i=1;i<=y;i++){
      |     ^
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:9: error: expected ';' before '}' token
   25 | return 0
      |         ^
      |         ;
   26 | }
      | ~
Language: C

#include <stdio.h>

int main(){

int x,y,t,c,k;

scanf("%d %d\n",&x,&y);

if(y>x){
 t = y;
 y = x;
 x = t;
}
k = 0;
c = x%y;

for(i=1;i<=y;i++){
 if((y%i==0) && (x%i==0)){
  k = i;
  }
}

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

return 0;
}

  

 


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

#include <stdio.h>

int main(){

int x,y,t,c,k;

scanf("%d %d\n",&x,&y);

if(y>x){
 t = y;
 y = x;
 x = t;
}
k = 0;

for(i=1;i<=y;i++){
 if((y%i==0) && (x%i==0)){
  k = i;
  }
}

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

return 0;
}

  

 


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

#include <stdio.h>

int main(){

int x,y,t,k;

scanf("%d %d\n",&x,&y);

if(y>x){
 t = y;
 y = x;
 x = t;
}
k = 0;

for(i=1;i<=y;i++){
 if((y%i==0) && (x%i==0)){
  k = i;
  }
}

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

return 0;
}

  

 


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

#include <stdio.h>

int  t(int x, int y){
if(y == 0){
 return x;
}
else {
return t(y,x%y);
}
}


int main(){

int x,y;
scanf("%d %d\n",&x,&y);

if(y>x){
 t = y;
 y = x;
 x = t;
}

printf("%d\n",t(x,y));

return 0;
}

  

 


Compiler output:
main.c: In function 'main':
main.c:19:4: error: lvalue required as left operand of assignment
   19 |  t = y;
      |    ^
main.c:21:4: error: assignment to 'int' from 'int (*)(int,  int)' makes integer from pointer without a cast [-Wint-conversion]
   21 |  x = t;
      |    ^
Language: C

#include<stdio.h>
int main(void)
{
	int r, a, b;
	scanf_s("%d %d", &a, &b);
	if (a < b)
	{
		r = a;
		a = b;
		b = r;
	}
	while (b > 0)
	{
		r = a % b;
		a = b;
		b = r;
	}
	printf("%d\n",r);
	return 0;
}


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

#include<stdio.h>
int main(void)
{
   int r, a, b;
   scanf_s("%d %d", &a, &b);
   if (a < b)
   {
       r = a;
       a = b;
       b = r;
   }
   while (b > 0)
   {
      r = a % b;
      a = b;
      b = r;
   }
      printf("%d\n",r);
      return 0;
}


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

#include <stdio.h>
int gcd(x,y){
    int new_x;
    int new_y;
    if(y=0) return x;
    new_x=y;
    new_y=x%y;
    gcd(new_x,new_y)
}

int main(){
    int x;
    int y;
    scanf("%d %d",&x,&y);
    printf("%d",(gcd(x,y)));
    return 0
}


Compiler output:
main.c: In function 'gcd':
main.c:2:5: error: type of 'x' defaults to 'int' [-Wimplicit-int]
    2 | int gcd(x,y){
      |     ^~~
main.c:2:5: error: type of 'y' defaults to 'int' [-Wimplicit-int]
main.c:8:21: error: expected ';' before '}' token
    8 |     gcd(new_x,new_y)
      |                     ^
      |                     ;
    9 | }
      | ~                    
main.c: In function 'main':
main.c:16:13: error: expected ';' before '}' token
   16 |     return 0
      |             ^
      |             ;
   17 | }
      | ~
Language: C

#include<stdio.h>

int main(void) {
	int X, Y;
	int max, min;
	int terget;
	int i;

	scanf_s("%d %d", &X, &Y);

	if (X > Y) {
		max = X;
		min = Y;
	}
	else {
		max = Y;
		min = X;
	}

	terget = max % min;
	i = terget;
	while (i) {
		if (terget%i == 0) {
			break;
		}
		i--;
	}
	printf("%d\n", i);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    9 |         scanf_s("%d %d", &X, &Y);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>

int main(void) {
	int X, Y;
	int min, max;

	scanf_s("%d %d", &X, &Y);

	max = X >= Y ? X : Y;
	min = X >= Y ? Y : X;

	while (max%min) {
		max = max % min;
		min = max >= min ? min : max;
	}
	
	printf("%d\n", max);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |         scanf_s("%d %d", &X, &Y);
      |         ^~~~~~~
      |         scanf
Language: C

main(){
  int a,b,c;
  
  scanf("%d%d",&a,&b);
  if(1<a<10^9 && 1<b<10^9){
    while(a%b!=0){
      c=a%b;
      a=b;
      b=c;
    }
  printf("%d\n",b);
  }
  return 0;

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){
      | ^~~~
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d%d",&a,&b);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d%d",&a,&b);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:11:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   11 |   printf("%d\n",b);
      |   ^~~~~~
main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:3: error: expected declaration or statement at end of input
   13 |   return 0;
      |   ^~~~~~
Language: C

#include <stdio.h>

int main(void){
    /*宣言部*/
    long nnum1, nnum2;    /*nnum1, nnum2:自然数a, b*/
    
    /*入力部*/
    scanf("%d%d", &nnum1, &nnum2);
    
    /*計算部*/    /*ユークリウッド互除法*/
    for (;!(nnum1==nnum2;)){    /*nnum1とnnum2が等しくなるまでループ*/
        /*大きい方から小さい方を引き続ける*/
        if (nnum1 > nnum2){
            nnum1 -= nnum2;
        }else if (nnum1 < nnum2){
            nnum2 -= nnum1;
        }
    }
    
    /*出力部*/
    printf("%d\n", nnum1);    /*nnum1とnnum2どちらも同じ最大公約数になってるので
                                とりあえずnnum1を表示*/
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:25: error: expected ')' before ';' token
   11 |     for (;!(nnum1==nnum2;)){    /*nnum1とnnum2が等しくなるまでループ*/
      |            ~            ^
      |                         )
main.c:11:27: error: expected ';' before ')' token
   11 |     for (;!(nnum1==nnum2;)){    /*nnum1とnnum2が等しくなるまでループ*/
      |                           ^
      |                           ;
Language: C

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

int main(){
	int a,b,g;
	int i;
	scanf("%d %d",&a,&b);
	if(a>b){
		a=a%b;
		b=b%a;
		for(i=1;i<=b;i++){
			if(a%i==0&&b%i==0){
				g=i;
			}
		}
	}
	else if(a<b){
		b=b%a;
		a=a%b;
		for(i=1;i<=a;i++){
			if(a%i==0&&b%i==0){
				g=i;
			}
		}
	}
	else if(a==b){
		g=a;

	}
	
	
	printf("%d\n",g);
	return 0;

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

#include <iostream>
using namespace std;

int main(){
	int a,b,tmp;
	cin >> a;
	cin >> b;
	while(1){
			if(b==0){
				cout << a;
				break;
			}
		}else{
			tmp = a;
			a = b;
			b = tmp % b;
		}
	}
	return 0;
}

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

#include<iostream>
using namespace std;

int gcd(int x,int y){
    int max;
    if(y % (x % y)==0){
        max = x % y;
        return max;
    }else{
        gcd(y,x % y);
    }
}

int main(){
    int x,y;
    cin >> x;
    cin >> y;
    if(x>=y)cout << gcd(x,y) << endl;
    if(y>x)cout << gcd(y,x) << endl;
    
    return 0;
}

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

#include<iostream>
using namespace std;

int gcd(int x,int y){
    int max;
    if(x == y){
        return x;
    }else if(y % (x % y)==0){
        max = x % y;
        return max;
    }else{
        gcd(y,x % y);
    }
}

int main(){
    int x,y;
    cin >> x;
    cin >> y;
    if(x>=y)cout << gcd(x,y) << endl;
    if(y>x)cout << gcd(y,x) << endl;
    
    return 0;
}

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

#include <stdio.h>

int GCD(int,int);

int main(void){
  
  int a,b;
  
  scanf("%d%d",&a,&b);
  
  printf("%d\n",GCD(a,b));
  
  return 0;
}

int GCD(int a, int b){
  
  int r;
  
  while(b!=0){
    
    r=b;
    b=a%b;
    a=r;

  }

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

#include<stdio.h>
int main(){
  int a,b,c;
  scan("%d %d",&a,&b);
  if(1<=a && a<=1000000000 && 1<=b && b<=100000000){
    while(a%b!=0){
      c=a%b;
      a=b;
      b=c;
    }
    print("%d\n",c);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scan'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    4 |   scan("%d %d",&a,&b);
      |   ^~~~
      |   scanf
main.c:11:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   11 |     print("%d\n",c);
      |     ^~~~~
      |     printf
Language: C

#include<stdio.h>
main(){
  int x,y,z;
  scanf("%d%d",&x,&y);
  if(x < y){
    z = y;
    y = x;
    x = z;
}
    while(y != 0){
      z = x % y;
      x = y;
      y = z;
    }
    printf("%d\n,x);
    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:15:12: warning: missing terminating " character
   15 |     printf("%d\n,x);
      |            ^
main.c:15:12: error: missing terminating " character
   15 |     printf("%d\n,x);
      |            ^~~~~~~~~
main.c:16:5: error: expected expression before 'return'
   16 |     return 0;
      |     ^~~~~~
main.c:16:14: error: expected ';' before '}' token
   16 |     return 0;
      |              ^
      |              ;
   17 | }
      | ~
Language: C

#include <stdio.h>

#define MAX 100000

int main (void)
{
  int i,j=0,a,b,x,y,d[MAX],gcd;
  
  scanf ("%d %d",&x,&y);
  
  if (x > y){
    a = y;
    b = x;
  }else{
    a = x;
    b = y;
  }
  if (a == b) gcd = a;
  else{
    for (i = 1 ; i <= (b % a) ; i++){
      if ((b % a) % i == 0){
	d[j] = (b % a)/i;
	j++;
      }
    }
    for (j = 0 ; j <= (b % a) ; j++){
      if (d[j] <= a && a%d[j] == 0){
	gcd = d[j];
	break;
      }
      else continue;
    }
  }

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

#include<stdio.h>

int main(){
  int x,y,z;
    scanf("%d %d",&x,&y);
  while (x%y! =0){
    z = x % y;
    x = y;
    y = z;

  }
  printf("%d",y);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: expected ')' before '!' token
    6 |   while (x%y! =0){
      |         ~   ^
      |             )
Language: C

 else
    {
      while(c != 0)
	{
	  c = b % a;
	  if(c == 0)
	    {
	      printf("%d\n",a);
	    }
	  else
	    {
	      b = a;
	      a = c;
	    }
	}
    }

Compiler output:
main.c:1:2: error: expected identifier or '(' before 'else'
    1 |  else
      |  ^~~~
Language: C

#include<stdio.h>
int main()
{
  int x,y,z;
  scanf("%d %d",&x,&y);
  while (x%y =0)
  {
    z = x % y;
    x = y;
    y = z;
  }
  printf("%d",y);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:14: error: lvalue required as left operand of assignment
    6 |   while (x%y =0)
      |              ^
Language: C

#include <stdio.h>

int main()
{
  int x, y, z;

  scanf("%d%d", &a, &b);
  if(x >= y)
    {
      x = x % y;
      for(z = y; z > 0; z--)
	{
	  if(x % z == 0 && y % z == 0) break;
	}
    }
  else (y >= x)
	 {
	      y = y % x;
	      for(z = x; z > 0; z--)
		{
		  if(x % z == 0 && y % z == 0) break;
		}    
	 }
  printf("%d", z);
}

Compiler output:
main.c: In function 'main':
main.c:7:18: error: 'a' undeclared (first use in this function)
    7 |   scanf("%d%d", &a, &b);
      |                  ^
main.c:7:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:22: error: 'b' undeclared (first use in this function)
    7 |   scanf("%d%d", &a, &b);
      |                      ^
main.c:16:16: error: expected ';' before '{' token
   16 |   else (y >= x)
      |                ^
      |                ;
   17 |          {
      |          ~
Language: C

#include <stdio.h>

int main()
{
  int x, y, z;

  scanf("%d%d", &x, &y);
  if(x >= y)
    {
      x = x % y;
      for(z = y; z > 0; z--)
	{
	  if(x % z == 0 && y % z == 0) break;
	}
    }
  else (y >= x)
	 {
	      y = y % x;
	      for(z = x; z > 0; z--)
		{
		  if(x % z == 0 && y % z == 0) break;
		}    
	 }
  printf("%d", z);
}

Compiler output:
main.c: In function 'main':
main.c:16:16: error: expected ';' before '{' token
   16 |   else (y >= x)
      |                ^
      |                ;
   17 |          {
      |          ~
Language: C

#include<stdio.h>
main() {

int n, m, j;

scanf("%d %d",&n &m);
while(m != 0) {
j = n % m;
n = m;
m = j;
}

printf("%d???n", n);
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:6:18: error: invalid operands to binary & (have 'int *' and 'int')
    6 | scanf("%d %d",&n &m);
      |               ~~ ^
      |               |
      |               int *
Language: C

#include<stdio.h>
main() {
int n, m, j;
scanf("%d %d",&n &m);
while(m != 0) {
j = n % m;
n = m;
m = j;
}
printf("%d???n", n);
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:4:18: error: invalid operands to binary & (have 'int *' and 'int')
    4 | scanf("%d %d",&n &m);
      |               ~~ ^
      |               |
      |               int *
Language: C

#include<stdio.h>
main() {
int n, m, j;
scanf("%d %d",&n &m);
while(m != 0) {
j = n % m;
n = m;
m = j;
}
printf("%d", n);
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:4:18: error: invalid operands to binary & (have 'int *' and 'int')
    4 | scanf("%d %d",&n &m);
      |               ~~ ^
      |               |
      |               int *
Language: C

#include<stdio.h>


main()
{

  int x,y,d;

  scanf("%d%d",&x,&y);
  while((d = x%y) !=0)
    {  

	  x = y; // ????????§y???x?????£??\??????
	  y = d;  
	
	 /* ?????????????????¨??§??????while?????????????°??????????????????¨?????§?????? */
    
     	 printf("%d\n",y);
	
  return 0;
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main()
      | ^~~~
main.c: In function 'main':
main.c:21:1: error: expected declaration or statement at end of input
   21 | }
      | ^
Language: C

#include<stdio.h>


main()
{

  int x,y,d;

  scanf("%d%d",&x,&y);
  while((d = x%y) !=0)
    {  

	  x = y; 
	  y = d;  
	
	 
    
     	 printf("%d\n",y);
	
  return 0;
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main()
      | ^~~~
main.c: In function 'main':
main.c:21:1: error: expected declaration or statement at end of input
   21 | }
      | ^
Language: C

#include<stdio.h>
main(){

  int x,y,r;

  scanf("%d%d",&x,&y);

  /*  if(x>=y){
    gcd(x,y)
  */
  
  gcd(x, y);
  if (x < y){
    swap(x, y);
  }
  
  while (y > 0){
    r = x % y;
    x = y;
    y = r;
  }
  return x;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:12:3: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
   12 |   gcd(x, y);
      |   ^~~
main.c:14:5: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   14 |     swap(x, y);
      |     ^~~~
Language: C

#include <stdio.h>

#define LOOP_END 0
#define EXIT_SUCCESS 0

int main(void)
{
	unsigned long long ullW_Dtc_x;				/*???????????±??????X*/
	unsigned long long ullW_Dtc_y;				/*???????????±??????Y*/
	unsigned long long ullW_Dcalc;				/*????\???¨?????°*/
	unsigned long long ullW_Dgcd;				/*?????§??¬?´???°*/
	
	scanf("%d %d", &ullW_Dtc_x, &ullW_Dtc_y);	/*???????????±????????\???*/
	if( ullW_Dtc_x < ullW_Dtc_y ){
		ullW_Dcalc = ullW_Dtc_x;
		ullW_Dtc_x = ullW_Dtc_y;
		ullW_Dtc_y = ullW_Dcalc;
	}
	while(ullW_Dtc_y > LOOP_END){
		ullW_Dcalc = ullW_Dx % ullW_Dy;
		ullW_Dtc_x = ullW_Dtc_y;
		ullW_Dtc_y = ullW_Dtc_r;
	}
	ullW_Dgcd = ullW_Dtc_x;
	printf("%lld\n", ullW_Dgcd);
	return EXIT_SUCCESS;
}

Compiler output:
main.c: In function 'main':
main.c:20:30: error: 'ullW_Dx' undeclared (first use in this function); did you mean 'ullW_Dgcd'?
   20 |                 ullW_Dcalc = ullW_Dx % ullW_Dy;
      |                              ^~~~~~~
      |                              ullW_Dgcd
main.c:20:30: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:40: error: 'ullW_Dy' undeclared (first use in this function); did you mean 'ullW_Dgcd'?
   20 |                 ullW_Dcalc = ullW_Dx % ullW_Dy;
      |                                        ^~~~~~~
      |                                        ullW_Dgcd
main.c:22:30: error: 'ullW_Dtc_r' undeclared (first use in this function); did you mean 'ullW_Dtc_y'?
   22 |                 ullW_Dtc_y = ullW_Dtc_r;
      |                              ^~~~~~~~~~
      |                              ullW_Dtc_y