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

int calcGCD(int a,int b){
	//??????????????????????????????
	int temp,i,r;
	//??????a???????????§???????????????????????????
	if(a < b){
		temp = a;
		a = b;
		b = temp;
	}
	while(1){
		r = a % b;
		if(r == 0) break;
		a = b; b = r;
	} 	
	return b;
}

long calcLCM(int a,int b){
	return ((long)a * b) / calcGCD(a, b);
}

int main(void){
    int a,b;
	
    while(scanf("%d %d", &a, &b) != EOF){	
        printf("%d %lu\n", getGCD(a, b), getLCM(a, b));
    }
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   25 |     while(scanf("%d %d", &a, &b) != EOF){
      |           ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int calcGCD(int a,int b){
main.c:25:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   25 |     while(scanf("%d %d", &a, &b) != EOF){
      |           ^~~~~
main.c:25:11: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:25:37: error: 'EOF' undeclared (first use in this function)
   25 |     while(scanf("%d %d", &a, &b) != EOF){
      |                                     ^~~
main.c:25:37: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:25:37: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   26 |         printf("%d %lu\n", getGCD(a, b), getLCM(a, b));
      |         ^~~~~~
main.c:26:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:26:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:26:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:26:28: error: implicit declaration of function 'getGCD' [-Wimplicit-function-declaration]
   26 |         printf("%d %lu\n", getGCD(a, b), getLCM(a, b));
      |                            ^~~~~~
main.c:26:42: error: implicit declaration of function 'getLCM' [-Wimplicit-function-declaration]
   26 |         printf("%d %lu\n", getGCD(a, b), getLCM(a, b));
      |                                          ^~~~~~
Language: C

import fileinput

for line in fileinput.input():
    tokens = list(map(int, line.strip().split()))
    a, b = tokens[0], tokens[1]
    d = a * b
    if a < b:
        tmp = a
        a = b
        b = tmp

    c = a % b
    while(c != 0):
        a = b
        b = c
        c = a % b

    g = b
    l = d / g

    print(str(g)+" "+str(int(l)))

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import fileinput
      | ^~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
    3 | for line in fileinput.input():
      | ^~~
Language: C

#include<stdio.h>
int main(){
	long long int a,b,A1,B1,A2,B2;
	int i
	for(i=0;i<50;i++){
	scanf("%lld %lld",&a,&b);
	A1=a;A2=a;B1=b;B2=b;
	
	for(;;){
	if(A1<B1){B1=B1-A1;}else if(A1>B1){A1=A1-B1;}//?????§??¬?´???°
	if(A2<B2){A2=A2+a;}else if(A2>B2){B2=B2+b;}//????°???¬?????°
		if(A1==B1&&A2==B2){break;}
	}
	
	printf("%lld %lld\n",A1,A2);
	}
	
	return 0;
}

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

#include<iostream>
#include<stdio.h> 
using namespace std;
long int GCD(long int a,long int b)
{
	long int c;
	c=a%b;
	a=b;
	b=c;
	if(c==0)
	return a;
	else
	return GCD(a,b);
}
long int LCM(long int a,long int b)
{
	return a/GCD(a,b)*b;
}
int main()
{
	long int a,b;
	while(scanf("%ld%ld",&a,&b)!=EOF)
	{
		cout<<GCD(a,b)<<" "<<LCM(a,b)<<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>
#include<stdio.h> 
using namespace std;
int GCD(int a,int b)
{
	int c;
	c=a%b;
	a=b;
	b=c;
	if(c==0)
	return a;
	else
	return GCD(a,b);
}
int LCM(int a,int b)
{
	return a/GCD(a,b)*b;
}
int main()
{
	 int a,b;
	while(scanf("%d%d",&a,&b)!=EOF)
	{
		cout<<GCD(a,b)<<" "<<LCM(a,b)<<endl;
	}
	return 0;
 } 

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

// 第二周作?（1）.c : 定?控制台?用程序的入口点。
//

//#include "stdafx.h"
#include<stdio.h>
#include<math.h>
using namespace std;
int main()
{
	long int a, b, c,x,y;
	while (scanf("%ld%ld", &a, &b) != EOF)
	{
		//a = (int)fabs(a);
		//b = (int)fabs(b);   //?保下面?算?a和b大于0；
		x = a;
		y = b;
		if (a < b)
		{
			c = a;
			a = b;
			b = c;
		}                   //?保循??a>b；
		while (b != 0)
		{
			c = a;
			a = b;
			b = c%a;
		}
		c = x*y / a;
		printf("%ld,%ld\n", a,c);
	}
    return 0;
}

Compiler output:
main.c:7:1: error: unknown type name 'using'
    7 | using namespace std;
      | ^~~~~
main.c:7:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    7 | using namespace std;
      |                 ^~~
Language: C

#include"stadio.h"
#include "stdlib.h"
int gcd(int m, int n) {
	if (n == 0)
		return m;
	else
		return (gcd(n, m%n));
}

int main()
{
	double x,m,n,y;
	while (scanf("%lf %lf",&m,&n)!=EOF)
	{
		x = gcd(m, n);
		y = (m * n) / x;
		printf("%.lf %.lf\n", x, y);
	}
return 0;
}

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

#include "stdio.h"

long long int GCD(long long int a, long long int b)   //最大公?数
{
	long long int n=1,a1,b1;
	a1 = a; b1 = b;
	while (n != 0)
	{
		n = a1%b1;
		a1 = b1;
		b1 = n;
	}
	return a1;
}
long long int LCM(long long int a, long long int b)    //最小公倍数
{
	long long int n ;
	n = (a*b) / GCD(a, b);
	return n;
}
int main()
{
	long long int a, b;
	while ((scanf_s("%lld %lld", &a, &b)) != EOF)
	{
		printf("%lld ", GCD(a, b));
		printf("%lld\n", LCM(a, b));
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   24 |         while ((scanf_s("%lld %lld", &a, &b)) != EOF)
      |                 ^~~~~~~
      |                 scanf
Language: C

#include <stdio.h>

int main(void)
{
	int a,b,w,ax,bx;
	int ya,ba,w;
	int i,j,on=0;
	scanf("%d %d",&a,&b);
	if(a<b){
		w=a;
		a=b;
		b=w;
	}
	ax=a;
	bx=b;
	for(i=1 ; i<=a ; i++){
		a=ax*i;
		b=bx;
		for(j=1 ; j<a ; j++){
			b=bx*j;
			if(a==b){
				on=1;
				ba=a;
				break;
			}
		}
		if(on==1)
			break;
	}
	a=ax;
	b=bx;
	if(a%b==0){
		ya=b;
	}
	else{
		for(i=ax ; i>=2 ; i--){
			a=ax/i;
			b=bx/i;
			if(ax%i==0 && bx%i==0){
					ya=i;
					break;
			}
		}
	}
	printf("%d %d\n",ya,ba);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:19: error: redeclaration of 'w' with no linkage
    6 |         int ya,ba,w;
      |                   ^
main.c:5:17: note: previous declaration of 'w' with type 'int'
    5 |         int a,b,w,ax,bx;
      |                 ^
Language: C

#include <iostream>
using namespace std;
 
long long gcd(long long a, long long b)
{
	if (b == 0)return a;
	return gcd(b, a%b);
}
 
long long lcm(long long a, long long b)
{
	return a * b / gcd(a, b);
}
 
int main(int argc, char *argv[])
{
	long long a, b;
	while (cin >> a >> b)
	{
		cout << gcd(a, b) << " " << lcm(a, b) << endl;
	}
 
	return 0;
}

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

#include<stdio.h>
int koubai(int a,int b);
int kouyaku(int a,int b);
int main(void){
	int a,b;

	while(scanf("%d %d",a,b) != EOF){
		pirntf("%d %d",kouyaku(a,b),koubai(a,b));
	}
	return 0;
}
int koubai(int a,int b){
	int i,bai;

	for(i=1;i<=a*b;i++){
		if(i%a==0 && i%b==0)
			bai =i;
	}

	return bai;
}
int kouyaku(int a,int b){

	int i,yaku;
	
	for(i=1;i<=a || i<=b;i++){
		if(a%i==0 && b%i==0)
			yaku =i;
	}
	return yaku
}

Compiler output:
main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    8 |                 pirntf("%d %d",kouyaku(a,b),koubai(a,b));
      |                 ^~~~~~
      |                 printf
main.c: In function 'kouyaku':
main.c:30:20: error: expected ';' before '}' token
   30 |         return yaku
      |                    ^
      |                    ;
   31 | }
      | ~
Language: C

#include<stdio.h>
int koubai(int a,int b);
int kouyaku(int a,int b);
int main(void){
	int a,b;

	while(scanf("%d %d",a,b) != EOF){
		pirntf("%d %d",kouyaku(a,b),koubai(a,b));
	}
	return 0;
}
int koubai(int a,int b){
	int i,bai;

	for(i=1;i<=a*b;i++){
		if(i%a==0 && i%b==0)
			bai =i;
	}

	return bai;
}
int kouyaku(int a,int b){

	int i,yaku;
	
	for(i=1;i<=a || i<=b;i++){
		if(a%i==0 && b%i==0)
			yaku =i;
	}
	return yaku;
}

Compiler output:
main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    8 |                 pirntf("%d %d",kouyaku(a,b),koubai(a,b));
      |                 ^~~~~~
      |                 printf
Language: C

include<stdio.h>
int koubai(int a,int b);
int kouyaku(int a,int b);
int main(void){
  int a,b;

  while(scanf("%d %d",&a,&b) != EOF){
    printf("%d %d\n",kouyaku(a,b),koubai(a,b));
  }
  return 0;
}
int koubai(int a,int b){
  int i;

  for(i=1;i<=a*b;i++){
    if(i%a==0 && i%b==0)
      break;
  }

  return i;
}
int kouyaku(int a,int b){

  int i,yaku;

  for(i=1;i<=a || i<=b;i++){
    if(a%i==0 && b%i==0)
      yaku =i;
  }
  return yaku;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |   while(scanf("%d %d",&a,&b) != EOF){
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
main.c:7:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |   while(scanf("%d %d",&a,&b) != EOF){
      |         ^~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:33: error: 'EOF' undeclared (first use in this function)
    7 |   while(scanf("%d %d",&a,&b) != EOF){
      |                                 ^~~
main.c:7:33: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:7:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    8 |     printf("%d %d\n",kouyaku(a,b),koubai(a,b));
      |     ^~~~~~
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:35: error: implicit declaration of function 'koubai' [-Wimplicit-function-declaration]
    8 |     printf("%d %d\n",kouyaku(a,b),koubai(a,b));
      |                                   ^~~~~~
Language: C

include<stdio.h>
int koubai(int a,int b);
int kouyaku(int a,int b);
int main(void){
  int a,b;

  while(scanf("%d %d",&a,&b) != EOF){
    printf("%d %d\n",kouyaku(a,b),koubai(a,b));
  }
  return 0;
}
int koubai(int a,int b){
  int i,bai;

  for(i=1;i<=a*b;i++){
    if(i%a==0 && i%b==0)
      bai =i;
   break;
  }

  return i;
}
int kouyaku(int a,int b){

  int i,yaku;

  for(i=1;i<=a || i<=b;i++){
    if(a%i==0 && b%i==0)
      yaku =i;
  }
  return yaku;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |   while(scanf("%d %d",&a,&b) != EOF){
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
main.c:7:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |   while(scanf("%d %d",&a,&b) != EOF){
      |         ^~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:33: error: 'EOF' undeclared (first use in this function)
    7 |   while(scanf("%d %d",&a,&b) != EOF){
      |                                 ^~~
main.c:7:33: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:7:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    8 |     printf("%d %d\n",kouyaku(a,b),koubai(a,b));
      |     ^~~~~~
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:35: error: implicit declaration of function 'koubai' [-Wimplicit-function-declaration]
    8 |     printf("%d %d\n",kouyaku(a,b),koubai(a,b));
      |                                   ^~~~~~
Language: C

#include<stdio.h>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;

long long int n,m;

int gcd(long long int a,long long int b)
{
	if(b==0)
	return a;
	return gcd(b,a%b);
}
int main()
{
	while(cin>>n>>m)
	{
		long long int c=gcd(n,m);
		long long int d=m*n/c;
		cout<<c<<" "<<d<<endl;
	}
	return 0;
}


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

#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
long long a,b;
long long GCD(long long x,long long y)
{
	if(x%y==0)return y;
	else return GCD(y,x%y);
}
int main()
{
	while(cin>>a>>b)
	{
		cout<<GCD(a,b)<<" "<<a/GCD(a,b)*b<<endl;	
	}
} 


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

#include<stdio.h>
long long gcd(long long a,long long b)
{
	if(b==0)
		return a;
	return gcd(b,a%b);
}
int main()
{
	long long n,m;
	while(scanf("%lld%lld",&n,&m)!=EOF)
	{
		long long tp=gcd(n,m);
		printf("%lld %lld\n",tp,(n/tp)*a);
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:14:48: error: 'a' undeclared (first use in this function)
   14 |                 printf("%lld %lld\n",tp,(n/tp)*a);
      |                                                ^
main.c:14:48: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int gcd(int a,int b)
{
	if(b==0) return a;
	return gcd(b,a%b);
} 

int lcm(int a,int b)
{
	return a/gcd(a,b)*b;
}

int main()
{
	int a,b;
	while(cin>>a>>b) {
		cout<<gcd(a,b)<<" "<<lcm(a,b)<<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>
#include<conio.h>
int hcf(int n1, int n2);
int main()
{
    long long a,b,l,x,y;
    while (scanf("%lld %lld",&a,&b)==2)
{
        x=a;
        y=b;
    while(a!=b)
    {
        if(a>b)
            a=a-b;
        else
            b=b-a;

    }
    printf("%lld",b);


    printf(" ");

        l=(x*y)/b;
    printf("%lld\n",l);
}
return 0;
}




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



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

#include <stdio.h>

int gcd(int a,int b){
  if(b=0){
    return a;
  }
  return gcd(b,a%b);
}

int main(){
  int a,b;
  scanf("%d%d",&a,&b) != EOF);
    int g=gcd(a,b);
    printf("%d %d\n",g,a/g*b);


  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:12:29: error: expected ';' before ')' token
   12 |   scanf("%d%d",&a,&b) != EOF);
      |                             ^
main.c:12:29: error: expected statement before ')' token
Language: C

#include <stdio.h>
int main(void)
{
int=a,b,c,r;
scanf("%d %d",&a,&b);

c=a*b;

if(a<b){
    tmp = a; 
    a = b; 
    b = tmp; 
  } 
r=a%b;
while(r!=0)
{
 b=a;
 a=r;
 r=a%b;}


printf("%d %d",gcd,c/gcd);


Compiler output:
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
    4 | int=a,b,c,r;
      |    ^
main.c:5:16: error: 'a' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                   ^
main.c:7:1: error: 'c' undeclared (first use in this function)
    7 | c=a*b;
      | ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
   10 |     tmp = a;
      |     ^~~
main.c:14:1: error: 'r' undeclared (first use in this function)
   14 | r=a%b;
      | ^
main.c:22:16: error: 'gcd' undeclared (first use in this function)
   22 | printf("%d %d",gcd,c/gcd);
      |                ^~~
main.c:22:1: error: expected declaration or statement at end of input
   22 | printf("%d %d",gcd,c/gcd);
      | ^~~~~~
Language: C

#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);

c=a*b;

if(a<b){
    tmp = a; 
    a = b; 
    b = tmp; 
  } 
r=a%b;
while(r!=0)
{
 b=a;
 a=r;
 r=a%b;}


printf("%d %d",r,c/r);


Compiler output:
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
    4 | int=a,b,c,r,tmp;
      |    ^
main.c:5:16: error: 'a' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                   ^
main.c:7:1: error: 'c' undeclared (first use in this function)
    7 | c=a*b;
      | ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
   10 |     tmp = a;
      |     ^~~
main.c:14:1: error: 'r' undeclared (first use in this function)
   14 | r=a%b;
      | ^
main.c:22:1: error: expected declaration or statement at end of input
   22 | printf("%d %d",r,c/r);
      | ^~~~~~
Language: C

#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);

c=a*b;

if(a<b){
    tmp = a; 
    a = b; 
    b = tmp; 
  } 
r=a%b;
while(r!=0)
{
 b=a;
 a=r;
 r=a%b;}


printf("%d %d",tmp,c/tmp);


Compiler output:
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
    4 | int=a,b,c,r,tmp;
      |    ^
main.c:5:16: error: 'a' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                   ^
main.c:7:1: error: 'c' undeclared (first use in this function)
    7 | c=a*b;
      | ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
   10 |     tmp = a;
      |     ^~~
main.c:14:1: error: 'r' undeclared (first use in this function)
   14 | r=a%b;
      | ^
main.c:22:1: error: expected declaration or statement at end of input
   22 | printf("%d %d",tmp,c/tmp);
      | ^~~~~~
Language: C

#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);

c=a*b;

if(a<b){
    tmp = a; 
    a = b; 
    b = tmp; 
  } 
r=a%b;
while(r!=0)
{
 a=b;
 b=r;
 r=a%b;}


printf("%d %d",b,c/b);


Compiler output:
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
    4 | int=a,b,c,r,tmp;
      |    ^
main.c:5:16: error: 'a' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                   ^
main.c:7:1: error: 'c' undeclared (first use in this function)
    7 | c=a*b;
      | ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
   10 |     tmp = a;
      |     ^~~
main.c:14:1: error: 'r' undeclared (first use in this function)
   14 | r=a%b;
      | ^
main.c:22:1: error: expected declaration or statement at end of input
   22 | printf("%d %d",b,c/b);
      | ^~~~~~
Language: C

#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);

c=a*b;

if(a<b){
    tmp = a; 
    a = b; 
    b = tmp; 
  } 
r=a%b;
while(r!=0)
{
 a=b;
 b=r;
 r=a%b;}


printf("%d %d",b,c/b);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
    4 | int=a,b,c,r,tmp;
      |    ^
main.c:5:16: error: 'a' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                   ^
main.c:7:1: error: 'c' undeclared (first use in this function)
    7 | c=a*b;
      | ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
   10 |     tmp = a;
      |     ^~~
main.c:14:1: error: 'r' undeclared (first use in this function)
   14 | r=a%b;
      | ^
Language: C

#include <stdio.h> int gcd(int a, int b) { if (a < b) { int tmp = a; a = b; b = tmp; } int r = a % b; while (r != 0) { a = b; b = r; r = a % b; } return b; } int main(void){ int a, b; while(scanf("%d %d\n", &a, &b) != EOF) { printf("%d %d\n", gcd(a, b), a / gcd(a, b) * b); } return 0; } 


Compiler output:
main.c:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> int gcd(int a, int b) { if (a < b) { int tmp = a; a = b; b = tmp; } int r = a % b; while (r != 0) { a = b; b = r; r = a % b; } return b; } int main(void){ int a, b; while(scanf("%d %d\n", &a, &b) != EOF) { printf("%d %d\n", gcd(a, b), a / gcd(a, b) * b); } return 0; }
      |                    ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

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

int gcd(int a, int b) {
  	int q,r;
	while(r!=0){
	q=b/a;
	r=b%a;
	b=a;
	a=r;
	}
	return b;
}

int main(void){
    int a, b;
    while(cin >> a >> b) {
      int lcm = a/gcd(a,b)*b;
      cout << gcd(a,b) << " " << lcm << endl;
    }
    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>
#include <cstdio>
using namespace std;

int gcd(int a, int b) {
    
  	int p,q,r;
  	if(a>b){p=b;b=a;a=p;}
	while(r!=0){
	q=b/a;
	r=b%a;
	b=a;
	a=r;
	}
	return b;
}

int main(void){
    longint a, b;
    while(cin >> a >> b) {
      int lcm = a/gcd(a,b)*b;
      cout << gcd(a,b) << " " << lcm << endl;
    }
    return 0;
}









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

#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);

c=a*b;

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

r=a%b;
while(r!=0)
{
 a=b;
 b=r;
 r=a%b;
}
printf("%d %d",b,c/b);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
    4 | int=a,b,c,r,tmp;
      |    ^
main.c:5:16: error: 'a' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                   ^
main.c:7:1: error: 'c' undeclared (first use in this function)
    7 | c=a*b;
      | ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
   10 |     tmp = a;
      |     ^~~
main.c:15:1: error: 'r' undeclared (first use in this function)
   15 | r=a%b;
      | ^
Language: C

#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);

c=a*b;

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

while(r!=0)
{
 a=b;
 b=r;
 r=a%b;
}
printf("%d %d",b,c/b);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
    4 | int=a,b,c,r,tmp;
      |    ^
main.c:5:16: error: 'a' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                   ^
main.c:7:1: error: 'c' undeclared (first use in this function)
    7 | c=a*b;
      | ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
   10 |     tmp = a;
      |     ^~~
main.c:15:7: error: 'r' undeclared (first use in this function)
   15 | while(r!=0)
      |       ^
Language: C

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

int gcd(int b, int a) {
    
  	int p,q,r;
  	if(a>b){p=b;b=a;a=p;}
	while(r!=0){
	q=b/a;
	r=b%a;
	b=a;
	a=r;
	}
	return b;
}

int main(void){
    int a, b;
    while(cin >> a >> b) {
      int lcm = a/gcd(a,b)*b;
      cout << gcd(a,b) << " " << lcm << endl;
    }
    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>
#include <cstdio>
using namespace std;

int gcd(int a, int b) {
  r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }
 return b;
}

int main(void){
   int a, b, tmp;
   if (a < b){
       tmp = b;
	b = a;
	a = tmp;

   }
   (cin >> a >> b);
     int lcm = b * a / gcd(a,b);
     cout << gcd(a,b) << " " << lcm << endl;
   
   return 0;
}


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

#include <stdio.h>
int main(void)
{
int=a,b,c,r,tmp;
scanf("%d %d",&a,&b);

c=a*b;

if(a<b){
    tmp = a; 
    a = b; 
    b = tmp; 
 } 
r=a%b;
while(r!=0)
{
 a=b;
 b=r;
 r=a%b;
}
printf("%d %d",b,c/b);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:4: error: expected identifier or '(' before '=' token
    4 | int=a,b,c,r,tmp;
      |    ^
main.c:5:16: error: 'a' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: 'b' undeclared (first use in this function)
    5 | scanf("%d %d",&a,&b);
      |                   ^
main.c:7:1: error: 'c' undeclared (first use in this function)
    7 | c=a*b;
      | ^
main.c:10:5: error: 'tmp' undeclared (first use in this function)
   10 |     tmp = a;
      |     ^~~
main.c:14:1: error: 'r' undeclared (first use in this function)
   14 | r=a%b;
      | ^
Language: C

#include <stdio.h>
int main(void)
{
    int m,n;
   int  lcm_num=lcm(m,n);
   int gcd_num=gcd(m,n);
    scanf("%d", &gcd_num);
    scanf("%d", &lcm_num);
    return 0;
}
    
   int  gcd(m,n){
    
    while (m != n){
        if(m >n)
            m=m-n;
        else
            n=n-m;
    }
    return m;
    }
    int lcm(m,n)
    {
     return (m*n/gcd(m,n) )
    }



Compiler output:
main.c: In function 'main':
main.c:5:17: error: implicit declaration of function 'lcm' [-Wimplicit-function-declaration]
    5 |    int  lcm_num=lcm(m,n);
      |                 ^~~
main.c:6:16: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
    6 |    int gcd_num=gcd(m,n);
      |                ^~~
main.c: In function 'gcd':
main.c:12:9: error: type of 'm' defaults to 'int' [-Wimplicit-int]
   12 |    int  gcd(m,n){
      |         ^~~
main.c:12:9: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c: In function 'lcm':
main.c:22:9: error: type of 'm' defaults to 'int' [-Wimplicit-int]
   22 |     int lcm(m,n)
      |         ^~~
main.c:22:9: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:24:28: error: expected ';' before '}' token
   24 |      return (m*n/gcd(m,n) )
      |                            ^
      |                            ;
   25 |     }
      |     ~
Language: C

#include <stdio.h> long gcd_euclid(long m, long n) { long temp; while (n) { temp = m % n; m = n; n = temp; } return m; } int main(){ long a, b; long temp; long gcd, lcm; while(scanf("%ld %ld", &a, &b)!=EOF){ gcd = gcd_euclid(a, b); temp = a / gcd; lcm = temp * b; printf("%ld %ld\n", gcd, lcm); } return 0; }


Compiler output:
main.c:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> long gcd_euclid(long m, long n) { long temp; while (n) { temp = m % n; m = n; n = temp; } return m; } int main(){ long a, b; long temp; long gcd, lcm; while(scanf("%ld %ld", &a, &b)!=EOF){ gcd = gcd_euclid(a, b); temp = a / gcd; lcm = temp * b; printf("%ld %ld\n", gcd, lcm); } return 0; }
      |                    ^~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include <iostream>
#include <cstdio>
using namespace std;
long gcd(long a, long b){
long p,q,r;
r=0;
if(a<b){
    p=b;
    b=a;
    a=p;
    }   
while(r){
    q=b/a;
    r=b%a;
    b=a;
    a=r;
    }    
    return b;
    }
int main(void){
    int a, b;
    while(cin >> a >> b) {
        int lcm = a/gcd(a,b)*b;
        cout << gcd(a,b) << " " << lcm << endl;
        } 
        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>
#include <cstdio>
using namespace std;

int gcd(int a, int b){

int p,q,r;

if(a<b){p=b;b=a;a=p;

}

   while(r!=0){
   q=b/a;
   r=b%a;
   b=a;
   a=r;
   }
   return b;
}

int main(void)
{    int a, b;
   while(cin >> a >> b) {
     int lcm = a*b/gcd(a,b);
     cout << gcd(a,b) << " " << lcm << endl;
   }
   return 0;
}


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

#include<stdio.h> int main(void){ int a,b,r,ans,a1,b1; double c; while(scanf("%d %d",&a,&b)!=EOF){ a1=a,b1=b; while(1){ r=a%b; if(r==0){ ans=b; break; }else{ a=b; b=r; } } c=(double)(a1)*(double)(b1)/(double)(ans); printf("%d %.0f\n",ans,c); } return 0; } 


Compiler output:
main.c:1:19: warning: extra tokens at end of #include directive
    1 | #include<stdio.h> int main(void){ int a,b,r,ans,a1,b1; double c; while(scanf("%d %d",&a,&b)!=EOF){ a1=a,b1=b; while(1){ r=a%b; if(r==0){ ans=b; break; }else{ a=b; b=r; } } c=(double)(a1)*(double)(b1)/(double)(ans); printf("%d %.0f\n",ans,c); } return 0; }
      |                   ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h> int main(void){ int m,n,g,l,work,a,b; while(scanf("%d%d",&m,&n)!=EOF){ a=m; b=n; if(m<n){ work=m; m=n; n=work; } while(n!=0){ work=m%n; m=n; n=work; } g=m; l=a/g; l*=b; printf("%d %d\n",g,l); } return 0; } 


Compiler output:
main.c:1:19: warning: extra tokens at end of #include directive
    1 | #include<stdio.h> int main(void){ int m,n,g,l,work,a,b; while(scanf("%d%d",&m,&n)!=EOF){ a=m; b=n; if(m<n){ work=m; m=n; n=work; } while(n!=0){ work=m%n; m=n; n=work; } g=m; l=a/g; l*=b; printf("%d %d\n",g,l); } return 0; }
      |                   ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h> int main() { long long int a,b,i,x,y,t; while(scanf("%lld%lld",&a,&b)==2){ x=a;y=b; while(b){ t=a%b; a=b; b=t; } printf("%lld %lld\n",a,(x*y)/a); } return 0; } 


Compiler output:
main.c:1:19: warning: extra tokens at end of #include directive
    1 | #include<stdio.h> int main() { long long int a,b,i,x,y,t; while(scanf("%lld%lld",&a,&b)==2){ x=a;y=b; while(b){ t=a%b; a=b; b=t; } printf("%lld %lld\n",a,(x*y)/a); } return 0; }
      |                   ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include <stdio.h>

int euclid(int a,int b) {
	if(b==0)return a;
	else return euclid(b,a%b);
}

int main(void) {
	int a,b;
	int gcd;
	while(!feof(stdin)) {
		scanf("%d %d",&a,&b);
		if(eof(stdin))break;
		gcd=euclid(a,b);
		printf("%d %d\n",gcd,a/gcd*b);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:20: error: implicit declaration of function 'eof'; did you mean 'feof'? [-Wimplicit-function-declaration]
   13 |                 if(eof(stdin))break;
      |                    ^~~
      |                    feof
Language: C

#include <stdio.h>

int main(void)
{
	int a, b, a2, b2;
	int max, min, r;
	
	while (scanf("%d %d", &a, &b) != EOF){
		a2 = a;
		b2 = b;
		r = 1;
		while (r != 0){
			r = a % d;
			a2 = b2;
			b2 = r;
		}
		max = b2;
		min = (a * b) / max;
		
		printf("%d %d\n", max, min);
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:13:33: error: 'd' undeclared (first use in this function)
   13 |                         r = a % d;
      |                                 ^
main.c:13:33: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int GCD(int a, int b);

int main(void)
{
	int a, b;
	int max, min, r;
	
	while (scanf("%d %d", &a, &b) != EOF){
		max = GCD(a, b);
		min = (a * b) / max;
		printf("%d %d\n", max. min);
	}
	
	return (0);
}

int GCD(int a, int b){ // a=ªêAb=ªq@Ü ÇÁ¿Åà¢¢
@int r; // ]è
@r = a % b; // abÌ]èªr
@if(r==0){
@@return b;
@}else{
@@return GCD(b, r);
@}
}

Compiler output:
main.c: In function 'main':
main.c:13:38: error: request for member 'min' in something not a structure or union
   13 |                 printf("%d %d\n", max. min);
      |                                      ^
main.c: In function 'GCD':
main.c:20:1: error: stray '\302' in program
   20 | <U+0081>@int r; // <U+0097>]<U+0082><U+00E8>
      | ^~~~~~~~
main.c:20:2: error: stray '@' in program
   20 | @int r; // ]è
      |  ^
main.c:21:1: error: stray '\302' in program
   21 | <U+0081>@r = a % b; // a<U+0081><U+0080>b<U+0082><U+00CC><U+0097>]<U+0082><U+00E8><U+0082><U+00AA>r
      | ^~~~~~~~
main.c:21:2: error: stray '@' in program
   21 | @r = a % b; // abÌ]èªr
      |  ^
main.c:22:1: error: stray '\302' in program
   22 | <U+0081>@if(r==0){
      | ^~~~~~~~
main.c:22:2: error: stray '@' in program
   22 | @if(r==0){
      |  ^
main.c:23:1: error: stray '\302' in program
   23 | <U+0081>@<U+0081>@return b;
      | ^~~~~~~~
main.c:23:2: error: stray '@' in program
   23 | @@return b;
      |  ^
main.c:23:3: error: stray '\302' in program
   23 | <U+0081>@<U+0081>@return b;
      |          ^~~~~~~~
main.c:23:4: error: stray '@' in program
   23 | @@return b;
      |    ^
main.c:24:1: error: stray '\302' in program
   24 | <U+0081>@}else{
      | ^~~~~~~~
main.c:24:2: error: stray '@' in program
   24 | @}else{
      |  ^
main.c:25:1: error: stray '\302' in program
   25 | <U+0081>@<U+0081>@return GCD(b, r);
      | ^~~~~~~~
main.c:25:2: error: stray '@' in program
   25 | @@return GCD(b, r);
      |  ^
main.c:25:3: error: stray '\302' in program
   25 | <U+0081>@<U+0081>@return GCD(b, r);
      |          ^~~~~~~~
main.c:25:4: error: stray '@' in program
   25 | @@return GCD(b, r);
      |    ^
main.c:26:1: error: stray '\302' in program
   26 | <U+0081>@}
      | ^~~~~~~~
main.c:26:2: error: stray '@' in program
   26 | @}
      |  ^
Language: C

#include <stdio.h>

__int64 gcd(void);
__int64 lcm(void);

int main(void){
	__int64 a , b;
	while(scanf("%lld %lld" , &a , &b)!=EOF){
		printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
	}
	return 0;
}

__int64 gcd( __int64 a , __int64 b ){
	__int64 r;
	while((r = a % b)!=0){
		a = b;
		b = r;
	}
	return b;
}

__int64 lcm( __int64 a , __int64 b){
	return a/gcd(a,b)*b;
}

Compiler output:
main.c:3:1: error: unknown type name '__int64'; did you mean '__int64_t'?
    3 | __int64 gcd(void);
      | ^~~~~~~
      | __int64_t
main.c:4:1: error: unknown type name '__int64'; did you mean '__int64_t'?
    4 | __int64 lcm(void);
      | ^~~~~~~
      | __int64_t
main.c: In function 'main':
main.c:7:9: error: unknown type name '__int64'; did you mean '__int64_t'?
    7 |         __int64 a , b;
      |         ^~~~~~~
      |         __int64_t
main.c:9:40: error: too many arguments to function 'gcd'
    9 |                 printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
      |                                        ^~~
main.c:3:9: note: declared here
    3 | __int64 gcd(void);
      |         ^~~
main.c:9:51: error: too many arguments to function 'lcm'
    9 |                 printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
      |                                                   ^~~
main.c:4:9: note: declared here
    4 | __int64 lcm(void);
      |         ^~~
main.c: At top level:
main.c:14:1: error: unknown type name '__int64'; did you mean '__int64_t'?
   14 | __int64 gcd( __int64 a , __int64 b ){
      | ^~~~~~~
      | __int64_t
main.c:14:14: error: unknown type name '__int64'; did you mean '__int64_t'?
   14 | __int64 gcd( __int64 a , __int64 b ){
      |              ^~~~~~~
      |              __int64_t
main.c:14:26: error: unknown type name '__int64'; did you mean '__int64_t'?
   14 | __int64 gcd( __int64 a , __int64 b ){
      |                          ^~~~~~~
      |                          __int64_t
main.c:23:1: error: unknown type name '__int64'; did you mean '__int64_t'?
   23 | __int64 lcm( __int64 a , __int64 b){
      | ^~~~~~~
      | __int64_t
main.c:23:14: error: unknown type name '__int64'; did you mean '__int64_t'?
   23 | __int64 lcm( __int64 a , __int64 b){
      |              ^~~~~~~
      |              __int64_t
main.c:23:26: error: unknown type name '__int64'; did you mean '__int64_t'?
   23 | __int64 lcm( __int64 a , __int64 b){
      |                          ^~~~~~~
      |                          __int64_t
Language: C

#include <stdio.h>

long long int gcd(void);
long long int lcm(void);

int main(void){
	long long int a , b;
	while(scanf("%lld %lld" , &a , &b)!=EOF){
		printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
	}
	return 0;
}

long long int gcd( long long int a , long long int b ){
	long long int r;
	while((r = a % b)!=0){
		a = b;
		b = r;
	}
	return b;
}

long long int lcm( long long int a , long long int b){
	return a/gcd(a,b)*b;
}

Compiler output:
main.c: In function 'main':
main.c:9:40: error: too many arguments to function 'gcd'
    9 |                 printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
      |                                        ^~~
main.c:3:15: note: declared here
    3 | long long int gcd(void);
      |               ^~~
main.c:9:51: error: too many arguments to function 'lcm'
    9 |                 printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
      |                                                   ^~~
main.c:4:15: note: declared here
    4 | long long int lcm(void);
      |               ^~~
main.c: At top level:
main.c:14:15: error: conflicting types for 'gcd'; have 'long long int(long long int,  long long int)'
   14 | long long int gcd( long long int a , long long int b ){
      |               ^~~
main.c:3:15: note: previous declaration of 'gcd' with type 'long long int(void)'
    3 | long long int gcd(void);
      |               ^~~
main.c:23:15: error: conflicting types for 'lcm'; have 'long long int(long long int,  long long int)'
   23 | long long int lcm( long long int a , long long int b){
      |               ^~~
main.c:4:15: note: previous declaration of 'lcm' with type 'long long int(void)'
    4 | long long int lcm(void);
      |               ^~~
Language: C

#include <stdio.h>

int main(void){
	long long int a , b;
	while(scanf("%lld %lld" , &a , &b)!=EOF){
		printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
	}
	return 0;
}

long long int gcd( long long int a , long long int b ){
	long long int r;
	while((r = a % b)!=0){
		a = b;
		b = r;
	}
	return b;
}

long long int lcm( long long int a , long long int b){
	return a/gcd(a,b)*b;
}

Compiler output:
main.c: In function 'main':
main.c:6:40: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
    6 |                 printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
      |                                        ^~~
main.c:6:51: error: implicit declaration of function 'lcm' [-Wimplicit-function-declaration]
    6 |                 printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
      |                                                   ^~~
main.c: At top level:
main.c:11:15: error: conflicting types for 'gcd'; have 'long long int(long long int,  long long int)'
   11 | long long int gcd( long long int a , long long int b ){
      |               ^~~
main.c:6:40: note: previous implicit declaration of 'gcd' with type 'int()'
    6 |                 printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
      |                                        ^~~
main.c:20:15: error: conflicting types for 'lcm'; have 'long long int(long long int,  long long int)'
   20 | long long int lcm( long long int a , long long int b){
      |               ^~~
main.c:6:51: note: previous implicit declaration of 'lcm' with type 'int()'
    6 |                 printf("%lld %lld\n" , gcd(a,b) , lcm(a,b));
      |                                                   ^~~
Language: C

#include <cstdio>
#include<stdio.h>

int main(){
	long unsigned int a, b, gcd, lcm;

	while(scanf("%llu %llu\n", &a, &b)+1){
		long unsigned int m, n, o;
		m = a;
		n = b;
		while(1){
			if(!(o = m % n)){
				gcd = n;
				break;
			}
			m = n;
			n = o;
		}
		lcm = a * b / gcd;
		printf("%llu %llu\n", gcd, lcm);
	}
	return 0;
}

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

#include<cstdio.h>
#include<stdio.h>

int main(){
	long unsigned int a, b, gcd, lcm;

	while(scanf("%llu %llu\n", &a, &b)+1){
		long unsigned int m, n, o;
		m = a;
		n = b;
		while(1){
			if(!(o = m % n)){
				gcd = n;
				break;
			}
			m = n;
			n = o;
		}
		lcm = a * b / gcd;
		printf("%llu %llu\n", gcd, lcm);
	}
	return 0;
}

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

#include<cstdio.h>
#include<stdio.h>

int main(){
	long unsigned int a, b, gcd, lcm;

	while(scanf("%llu %llu", &a, &b)+1){
		long unsigned int m, n, o;
		m = a;
		n = b;
		while(1){
			if(!(o = m % n)){
				gcd = n;
				break;
			}
			m = n;
			n = o;
		}
		lcm = a * b / gcd;
		printf("%llu %llu\n", gcd, lcm);
	}
	return 0;
}

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

#include<cstdio>
#include<stdio.h>

int main(){
	long unsigned int a, b, gcd, lcm;

	while(scanf("%llu %llu", &a, &b)+1){
		long unsigned int m, n, o;
		m = a;
		n = b;
		while(1){
			if(!(o = m % n)){
				gcd = n;
				break;
			}
			m = n;
			n = o;
		}
		lcm = a * b / gcd;
		printf("%llu %llu\n", gcd, lcm);
	}
	return 0;
}

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

c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
    1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
      |   ^
main.c: In function 'g':
main.c:1:3: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:3: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c: At top level:
main.c:1:26: error: return type defaults to 'int' [-Wimplicit-int]
    1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
      |                          ^~~~
main.c: In function 'main':
main.c:1:26: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:26: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:42: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
      |                                          ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
main.c:1:42: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
      |                                          ^~~~~
main.c:1:42: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:62: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
      |                                                              ^~~~~~
main.c:1:62: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:62: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:62: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:79: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
    1 | c;g(a,b){c=b?g(b,a%b):a;}main(a,b){for(;~scanf("%u%u",&a,&b);printf("%u %u\n",gcd(a,b),a/c*b));}
      |                                                                               ^~~
Language: C

#include <stdio.h>
#include <conio.h>

int main(void)
{
	int a, b;
	int i;
	int Max;
	int Min = 0;
	
	while (scanf("%d %d", &a, &b) != EOF){
		for (i = 2; 1; i++){
			if (i < a){
				if (a % i == 0 && b % i == 0){
					Max = i;
				}
			}else {
				if (i % a == 0 && i % b == 0){
					Min = i;
				}
			}
			if (Min != 0) break;
		}
		printf("%d %d\n", Max, Min);
		Max = 0;
		Min = 0;
	}
	
	return (0);
}

Compiler output:
main.c:2:10: fatal error: conio.h: No such file or directory
    2 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.