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

#include <stdio.h>
int main() {
    int x, y, r;
    scanf("%d %d", &x, &y);

    if(x >= 1 && y >= 1 && y <= 1000000000){
       if(x > y){
           max = x;
           min = y;
       }else{
           max = y;
           min = x;
       }

       if(max > min){
           while(r > 0){
               r = max % min;
               max = min;
               min = r;
           }
           printf("%d\n", r);
       }else{
           printf("%d\n", max);
       }
    }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:12: error: 'max' undeclared (first use in this function)
    8 |            max = x;
      |            ^~~
main.c:8:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:12: error: 'min' undeclared (first use in this function); did you mean 'main'?
    9 |            min = y;
      |            ^~~
      |            main
Language: C

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

  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", r);

  return x;
}

Compiler output:
main.c: In function 'main':
main.c:10:6: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   10 |      swap(x, y)
      |      ^~~~
main.c:10:16: error: expected ';' before 'while'
   10 |      swap(x, y)
      |                ^
      |                ;
   11 |   while (y > 0)
      |   ~~~~~
Language: C

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

  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", r);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:6: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   10 |      swap(x, y)
      |      ^~~~
main.c:10:16: error: expected ';' before 'while'
   10 |      swap(x, y)
      |                ^
      |                ;
   11 |   while (y > 0)
      |   ~~~~~
Language: C

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

  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", r);

  return 0;
}

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

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

  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;

  return x;

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

  return 0;
}

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

#include <stdio.h>

int main(){
  int a, b, d, e, i, k, aa, bb;

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

  if(a > b){
    c = a % b;
    d = a;
  } else {
    c = b % a;
    d = b;
  }

  e = 1;
  for(i=1; i <= d; i++){
  aa = c%i;
  bb = d%i;
    if( aa == 0){
      if( bb == 0){
         e = i;
      }
    }

  }

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

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

#include <stdio.h>

int main(){

	int a,b,c=1,x,y;

	if(x>y)
		a=x,b=y;
	else
		a=y,b=x;

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

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:20: error: expected ';' before '}' token
   15 |                 b=c
      |                    ^
      |                    ;
   16 |                 }
      |                 ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:22: error: expected ';' before 'a'
   10 |         else (a >= b) a = a % b ;
      |                      ^~
      |                      ;
Language: C

#include<stdio.h>

int main(){
  int x[2];
  int x, y, temp;
  scanf("%d %d\n", &x, &y);

  if(x>=y){
    x[0]=x;
    x[1]=y;
  }
  else{
      x[0]=y;
      x[1]=x;
  }
  
  while(x[1]!=0){
       temp = x[0];
       x[0] = x[1];
       x[1] = x[0]%temp;
  }
   printf("%d\n", x[0]);

 return 0;
}
    
         

Compiler output:
main.c: In function 'main':
main.c:5:7: error: conflicting types for 'x'; have 'int'
    5 |   int x, y, temp;
      |       ^
main.c:4:7: note: previous declaration of 'x' with type 'int[2]'
    4 |   int x[2];
      |       ^
Language: C

#include<stdio.h>

int main(){
  int x[2];
  int x, y, temp;
  scanf("%d %d\n", &x, &y);

  if(x>=y){
    x[0]=x;
    x[1]=y;
  }
  else{
      x[0]=y;
      x[1]=x;
  }
  
  while(x[1]!=0){
       temp = x[0];
       x[0] = x[1];
       x[1] = temp%x[0];
  }
   printf("%d\n", x[0]);

 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:7: error: conflicting types for 'x'; have 'int'
    5 |   int x, y, temp;
      |       ^
main.c:4:7: note: previous declaration of 'x' with type 'int[2]'
    4 |   int x[2];
      |       ^
Language: C

#include <stdio.h>

int amari (int x, int y)
{
    int yojo;

    yojo = x % y;

    if ((yojo != 0) && (yojo != 1))
    {
        amari (y, yojo);
    }

    return y;
}

int main()
{

    int a, b;

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

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

    return 0;

}

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

#include <stdio.h>

int amari (int x, int y)
{
    int yojo;

    yojo = x % y;

    if ((yojo != 0) && (yojo != 1))
    {
        amari (y, yojo);
    }

    return y;
}

int main(void)
{

    int a, b;

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

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

    return 0;

}

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

#include <stdio.h>

int amari (int x, int y)
{
    int yojo;

    yojo = x % y;

    if ((yojo != 0) && (yojo != 1))
    
        amari (y, yojo);
    

    return y;
}

int main()
{

    int a, b;

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

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

    return 0;

}

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

#include <stdio.h>

int main() {
  int i;
  int x, y;
  int d, gcd = 1;

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

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

  else {
    for (i = 1 ; i <= y%x ; i++) {
      d = i;
      if (y%d == 0 && (y%x)%d == 0 && d > gcd)
        gcd = d;
    }
  }

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

  report 0;
}

Compiler output:
main.c: In function 'main':
main.c:28:3: error: 'report' undeclared (first use in this function)
   28 |   report 0;
      |   ^~~~~~
main.c:28:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:28:9: error: expected ';' before numeric constant
   28 |   report 0;
      |         ^~
      |         ;
Language: C

#include <stdio.h>

int main(void) {
  int i;
  int x, y;
  int d, temp;

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

  

  if (y > x) {
??????temp = y;
??????y = x;
??????x = temp;
  }
  
  d = x%y;
  while (d != 0) {
??????x = y;
??????y = d;
    d = x%y;
  }

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

Compiler output:
main.c: In function 'main':
main.c:13:1: error: expected expression before '?' token
   13 | ??????temp = y;
      | ^
main.c:14:1: error: expected expression before '?' token
   14 | ??????y = x;
      | ^
main.c:15:1: error: expected expression before '?' token
   15 | ??????x = temp;
      | ^
main.c:20:1: error: expected expression before '?' token
   20 | ??????x = y;
      | ^
main.c:21:1: error: expected expression before '?' token
   21 | ??????y = d;
      | ^
Language: C

#include <stdio.h>

int main(void) {
  int i;
  int x, y;
  int d, temp;

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

  if (y > x) {
??????temp = y;
??????y = x;
??????x = temp;
  }
  
  d = x%y;
  while (d != 0) {
??????x = y;
??????y = d;
    d = x%y;
  }

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

Compiler output:
main.c: In function 'main':
main.c:11:1: error: expected expression before '?' token
   11 | ??????temp = y;
      | ^
main.c:12:1: error: expected expression before '?' token
   12 | ??????y = x;
      | ^
main.c:13:1: error: expected expression before '?' token
   13 | ??????x = temp;
      | ^
main.c:18:1: error: expected expression before '?' token
   18 | ??????x = y;
      | ^
main.c:19:1: error: expected expression before '?' token
   19 | ??????y = d;
      | ^
Language: C

#include <stdio.h>

int main(void){

  int x, y, d, i, xy, max;

  scanf("%d%d", &x, &y);
  
  if(y > x){
    i = x;
    x = y;
    y = i;
  }y

  xy = x%y;

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

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

Compiler output:
main.c: In function 'main':
main.c:13:5: error: expected ';' before 'xy'
   13 |   }y
      |     ^
      |     ;
   14 | 
   15 |   xy = x%y;
      |   ~~
Language: C

#include <stdio.h>

int main(void){

  int x, y, d, i, xy, max;

  scanf("%d%d", &x, &y);
  
  if(y > x){
    i = x;
    x = y;
    y = i;
  }y

  xy = x%y;

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

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

Compiler output:
main.c: In function 'main':
main.c:13:5: error: expected ';' before 'xy'
   13 |   }y
      |     ^
      |     ;
   14 | 
   15 |   xy = x%y;
      |   ~~
Language: C

#include <stdio.h>
#include <stdlib.h>

using namespace std;

int main(void) {
    int a, b;
    scanf("%d %d", &a, &b);
    int mn;
    if (a>=b) mn = b;
    else mn = a;

    for (int i=mn; i>=1; i--) {
        if (a%i==0 && b%i==0) {
            printf("%d\n", i);
            return 0;
        }
    }
    //printf("%d", 1);
    return 0;
}

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

include<stdio.h>
int gcd(int,int);

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

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

d=gcd(a,b);

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

int gcd(int a,int b){
int r;

if x<y;
swap(x,y);
r=x%y;
x=y;
y=r;

return x;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'main':
main.c:8:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 | scanf("%d%d",&a,&b);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
main.c:8:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 | scanf("%d%d",&a,&b);
      | ^~~~~
main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:3: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
   10 | d=gcd(a,b);
      |   ^~~
main.c:12:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   12 | printf("%d\n",d);
      | ^~~~~~
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: In function 'gcd':
main.c:18:4: error: expected '(' before 'x'
   18 | if x<y;
      |    ^
      |    (
main.c:18:4: error: 'x' undeclared (first use in this function)
main.c:18:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:1: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   19 | swap(x,y);
      | ^~~~
main.c:19:8: error: 'y' undeclared (first use in this function)
   19 | swap(x,y);
      |        ^
Language: C

include<stdio.h>
int gcd(int,int);

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

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

d=gcd(a,b);

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

int gcd(int x,int y){
int r;

if x<y;
swap(x,y);
r=x%y;
x=y;
y=r;

return x;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'main':
main.c:8:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 | scanf("%d%d",&a,&b);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
main.c:8:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 | scanf("%d%d",&a,&b);
      | ^~~~~
main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:3: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
   10 | d=gcd(a,b);
      |   ^~~
main.c:12:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   12 | printf("%d\n",d);
      | ^~~~~~
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: In function 'gcd':
main.c:18:4: error: expected '(' before 'x'
   18 | if x<y;
      |    ^
      |    (
main.c:19:1: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   19 | swap(x,y);
      | ^~~~
Language: C

include<stdio.h>

int main() {
  
  int a, b, n, m;

  scanf("%d%d", &a, &b);
  if(a < b) n = a;
  else n = b;

  for(m = n; m > 0; m--) {
    if(a % m == 0 && b % m == 0) break;
  }

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

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


  if(x < y){
    z = x;
    x = y;
    y = z;
  }
  while( y > 0 ){
    r = x % y;
    x = y;
    y = r;
  }

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

Compiler output:
main.c:2:3: error: expected identifier or '(' before 'if'
    2 |   if(x < y){
      |   ^~
main.c:7:3: error: expected identifier or '(' before 'while'
    7 |   while( y > 0 ){
      |   ^~~~~
main.c:13:10: error: expected declaration specifiers or '...' before string constant
   13 |   printf("%d\n" x);
      |          ^~~~~~
main.c:15:5: error: expected identifier or '(' before 'return'
   15 |     return 0;
      |     ^~~~~~
main.c:16:3: error: expected identifier or '(' before '}' token
   16 |   }
      |   ^
Language: C

#include<stdio.h>
int main(){
int x.y,m,n,k;
scanf("%d%d",&x,&y);
if(x>=y){
m=x;
n=y;
}
else{
m=y;
n=x;
}
while(n!=0){
k=n;
n=m%n;
m=k;
}
printf("%d\n",m);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | int x.y,m,n,k;
      |      ^
main.c:3:6: error: expected expression before '.' token
main.c:3:9: error: 'm' undeclared (first use in this function)
    3 | int x.y,m,n,k;
      |         ^
main.c:3:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:11: error: 'n' undeclared (first use in this function)
    3 | int x.y,m,n,k;
      |           ^
main.c:3:13: error: 'k' undeclared (first use in this function)
    3 | int x.y,m,n,k;
      |             ^
main.c:4:15: error: 'x' undeclared (first use in this function)
    4 | scanf("%d%d",&x,&y);
      |               ^
main.c:4:18: error: 'y' undeclared (first use in this function)
    4 | scanf("%d%d",&x,&y);
      |                  ^
Language: C

#include <stdio.h>

int main(){
  int x,y,a=0,i,temp=0;
  scanf("%d %d",&x,&y);

  if(x<y){
    temp=y;
    y = x;
    x = temp;
  }
  a = x % y;
  white(r !=0){
    x = y;
    b = a;
    a = x%y;
  }

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


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:3: error: implicit declaration of function 'white'; did you mean 'fwrite'? [-Wimplicit-function-declaration]
   13 |   white(r !=0){
      |   ^~~~~
      |   fwrite
main.c:13:9: error: 'r' undeclared (first use in this function)
   13 |   white(r !=0){
      |         ^
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:15: error: expected ';' before '{' token
   13 |   white(r !=0){
      |               ^
      |               ;
Language: C

#include <stdio.h>

int main(){
  int x,y,a=0,i,temp=0;
  scanf("%d %d",&x,&y);

  if(x<y){
    temp=y;
    y = x;
    x = temp;
  }
  a = x % y;
  white(a!=0){
    x = y;
    b = a;
    a = x%y;
  }

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


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:3: error: implicit declaration of function 'white'; did you mean 'fwrite'? [-Wimplicit-function-declaration]
   13 |   white(a!=0){
      |   ^~~~~
      |   fwrite
main.c:13:14: error: expected ';' before '{' token
   13 |   white(a!=0){
      |              ^
      |              ;
Language: C

void swap(int *x, int *y)
{
        int tmp;

        tmp = *x;
        *x = *y;
        *y = tmp;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include <stdio.h>
int main(){
  int x,y,work,i,zan;
  scanf("%d %d",&x,&y);

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

  zan=x%y;

  while(zan!=0){
    x=y;
    y=zan;
    zan=x%y;
  }

  printf("%d"\n,y);
}
  

Compiler output:
main.c: In function 'main':
main.c:20:14: error: stray '\' in program
   20 |   printf("%d"\n,y);
      |              ^
main.c:20:14: error: expected ')' before 'n'
   20 |   printf("%d"\n,y);
      |         ~    ^~
      |              )
Language: C

#include <stdio.h>
#include <math.h>
int gcd(int,int);
int main(){
  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",x);
  return 0;
}

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

include <stdio.h>

/*147 into x, 105 into y*/
#define MAX 10000000000

int gcd(int,int);

int main(){
  int x,y;
  int d,n;
  int tmp,ans;

  scanf("%d %d",&x,&y);
  if(x <= 0 || MAX < y){
    return 0;
  }
  ans = gcd(x,y);
  printf("%d\n",ans);

  return 0;
}

int gcd(int x,int y){
 int tmp;
 int r;

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

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'main':
main.c:13:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   13 |   scanf("%d %d",&x,&y);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include <stdio.h>
main.c:13:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   13 |   scanf("%d %d",&x,&y);
      |   ^~~~~
main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:17:9: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
   17 |   ans = gcd(x,y);
      |         ^~~
main.c:18:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |   printf("%d\n",ans);
      |   ^~~~~~
main.c:18:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

  int a,b,m,n;

  if(a>=b){
    m=a;
    n=b;
  }
  else {
    m=b;
    n=a;
  }

  while(n!=0){
    k=n;
  n=m%n;
  m=k;
  
  }
  return 0;
}

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

#include <stdio.h>

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

  return 0;
}

int gcd(int x,int y){
  int z,i;
  
  for(i=0;i<r;i++){
    z=y;
    y = x%y;
    x=z;
    if(y==0) break;
  }
  return x;

}

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

#include<stdio.h>

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

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

  while(1>x || y > (int)pow(10.0,9.0)){
    printf("Warning, x>=1,y<=10^9\n");
    scanf("%d%d", &x, &y);
  }

  if(x<y) x^=y^=x^=y;

  d=x%y;

  while(d!=1){
    if(d==0){
      printf("%d\n", y);
      break;
    }
    x=y, y=d;
    d=x%y;
  }

  return 0;

Compiler output:
main.c: In function 'main':
main.c:8:25: error: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
    8 |   while(1>x || y > (int)pow(10.0,9.0)){
      |                         ^~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'pow'
    1 | #include<stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:8:25: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
    8 |   while(1>x || y > (int)pow(10.0,9.0)){
      |                         ^~~
main.c:8:25: note: include '<math.h>' or provide a declaration of 'pow'
main.c:26:3: error: expected declaration or statement at end of input
   26 |   return 0;
      |   ^~~~~~
Language: C

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

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

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

  while(1>x || y > (int)pow(10.0,9.0)){
    printf("Warning, x>=1,y<=10^9\n");
    scanf("%d%d", &x, &y);
  }

  if(x<y) x^=y^=x^=y;

  d=x%y;

  while(d!=1){
    if(d==0){
      printf("%d\n", y);
      break;
    }
    x=y, y=d;
    d=x%y;
  }

  return 0;

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

#include <stdio.h>
int main(void){
  int x;
  int y;
  int i;

  scanf("%d%d",x,y);
  if(x>y){
  int max=x;
    for(i=0;i<x;i++){
      if(x%max==0&&y%max==){
        printf("%d",max);
break;
      }
      max--;
    }
  }else{
  int max=y;
    for(i=0;i<x;i++){
      if(x%max==0&&y%max==){
        printf("%d",max);
      break;
      }
      max--;
    }
  }

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:27: error: expected expression before ')' token
   11 |       if(x%max==0&&y%max==){
      |                           ^
main.c:20:27: error: expected expression before ')' token
   20 |       if(x%max==0&&y%max==){
      |                           ^
Language: C

#include <stdio.h>
int main(void){
  int x;
  int y;
  int i;
  scanf("%d %d",&x,&y);
  if(x>y){
  int max=y;
    for(max<0;max--;){
      if(x%max==0&&y%max==0){
        printf("%d\n",max);
      break;
      }
      
    }
  }else{
  int max=x;
    for(max<0;max--;){
      if(x%max==0&&y%max==0){
        printf("%d\n",max);
      break;
      }
      
    }#include <stdio.h>
int main(void){
  int x;
  int y;
  int i;

  scanf("%d %d",&x,&y);
  if(x>y){
  int max=y;
    for(i=0;i<y;i++){
      if(x%max==0&&y%max==0){
        printf("%d\n",max);
      break;
      }
      max--;
    }
  }else{
  int max=x;
    for(i=0;i<x;i++){
      if(x%max==0&&y%max==0){
        printf("%d\n",max);
      break;
      }
      max--;
    }
  }

return 0;
}
  }

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:6: error: stray '#' in program
   24 |     }#include <stdio.h>
      |      ^
main.c:24:7: error: 'include' undeclared (first use in this function)
   24 |     }#include <stdio.h>
      |       ^~~~~~~
main.c:24:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:16: error: 'stdio' undeclared (first use in this function); did you mean 'stdin'?
   24 |     }#include <stdio.h>
      |                ^~~~~
      |                stdin
main.c:25:1: error: expected expression before 'int'
   25 | int main(void){
      | ^~~
Language: C

#include<stdio.h>
??
int main(void){
????int x,y,t;
??
????scanf("%d %d",&x,&y);
??
????while(1){
??????if(x>=y) t=x%y;
??????else t=y%x;
??
??????if(t==0) break;
??????else {x=y;
??????????????????y=t;
??????}
????}
????printf("%d\n",y);
????
????return 0;
}

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

#include<stdio.h>
??
int main(){
????????int x, y, min, max, rem;
??
????????scanf("%d %d", &x, &y);
??
????????if(x == y){
????????????????printf("%d\n", x);
????????????????return 0;
????????}
??
????????if(x < y){
????????????????min = x;
????????????????max = y;
????????}else{
????????????????min = y;
????????????????max = x;
????????}
??
????????while(min > 0){
????????????????rem = max%min;
????????????????max = min;
????????????????min = rem;
????????}
??
????????printf("%d\n", max);
??
????????return 0;
}

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

#include<stdio.h>
int main(void){
	long long int x,y,temp,i,div;
	if( x > y){temp=x;x=y;y=temp;}
	for(i=0;i<x-1;i++){
		if( x % i)==0 &&(y%i==0){div=i;}
	}
	printf("%lld\n",div);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:27: error: expected expression before '==' token
    6 |                 if( x % i)==0 &&(y%i==0){div=i;}
      |                           ^~
Language: C

#include <iostream>
using namespace std;

int main() {
	int x;
	int y;
	int big;
	int small;
	int tmp;
	scanf("%d%d",&x,&y);
	if(x>y){
		big = x;
		small = y;
	}else{
		big = y;
		small = x;
	}
	while(small != 0){
		tmp = small;
		small = big % small;
		big = tmp;
	}
	printf("%d",big);
	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(){
  int a,b,x,y,z=1,c;
 
  scanf("%d%d",&x,&y);
 
  if(x-y >= 0){
    a=x;
    b=y;
  }
  else if {
    b=x;
    a=y;
  }
 
  while(z!=0){
    z=a%b;
    a=b;
    b=z;
  }
  c=a;
  printf("%d\n",c);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:11: error: expected '(' before '{' token
   12 |   else if {
      |           ^
      |           (
Language: C

def gcd(a,b):
	if a < b:
		a,b = b,a
	while b != 0:
		a,b = b,a%b
	return a

a,b = map(int,raw_input().split())
print gcd(a,b)

Compiler output:
main.c:1:1: error: unknown type name 'def'
    1 | def gcd(a,b):
      | ^~~
main.c: In function 'gcd':
main.c:1:13: error: expected declaration specifiers before ':' token
    1 | def gcd(a,b):
      |             ^
main.c:1:5: error: type of 'a' defaults to 'int' [-Wimplicit-int]
    1 | def gcd(a,b):
      |     ^~~
main.c:1:5: error: type of 'b' defaults to 'int' [-Wimplicit-int]
Language: C

#include <stdio.h>

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

  scanf("%d %d", &x, &y);
 
  if(x > y){
    do{
      z = y
      y = x%y
    }while(y != 0);
  }else{
    do{
      z = x
      x = y%x;
    }while(x != 0);
  }

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

  return 0;
}
      
    

Compiler output:
main.c: In function 'main':
main.c:11:12: error: expected ';' before 'y'
   11 |       z = y
      |            ^
      |            ;
   12 |       y = x%y
      |       ~     
main.c:16:12: error: expected ';' before 'x'
   16 |       z = x
      |            ^
      |            ;
   17 |       x = y%x;
      |       ~
Language: C

#include <stdio.h>
int main()
{
    int a, b, ans;
    int a_divisor[], b_divisor[];
    int i, j

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

    for(i = 1; i < a; i++){
        if(a%i == 0){
            a_divisior += [a/i];
        }
    }

    for(i = 1; i < b; i++){
        if(b%i == 0){
            b_divisior += [b/i];
        }
    }

    ans = 0;
    i = 0;
    do {
        j = 0;
        do {
            if (a[i] == b[j]){
                ans = a[i];
            j += 1;
        } while(ans == 0);
        i += 1;
    } while(ans == 0);

    printf("%d", ans);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: array size missing in 'a_divisor'
    5 |     int a_divisor[], b_divisor[];
      |         ^~~~~~~~~
main.c:5:22: error: array size missing in 'b_divisor'
    5 |     int a_divisor[], b_divisor[];
      |                      ^~~~~~~~~
main.c:8:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    8 |     scanf("%d %d", &a, &b);
      |     ^~~~~
main.c:12:13: error: 'a_divisior' undeclared (first use in this function); did you mean 'a_divisor'?
   12 |             a_divisior += [a/i];
      |             ^~~~~~~~~~
      |             a_divisor
main.c:12:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:27: error: expected expression before '[' token
   12 |             a_divisior += [a/i];
      |                           ^
main.c:18:13: error: 'b_divisior' undeclared (first use in this function); did you mean 'b_divisor'?
   18 |             b_divisior += [b/i];
      |             ^~~~~~~~~~
      |             b_divisor
main.c:18:27: error: expected expression before '[' token
   18 |             b_divisior += [b/i];
      |                           ^
main.c:25:9: error: 'j' undeclared (first use in this function)
   25 |         j = 0;
      |         ^
main.c:27:18: error: subscripted value is neither array nor pointer nor vector
   27 |             if (a[i] == b[j]){
      |                  ^
main.c:28:24: error: subscripted value is neither array nor pointer nor vector
   28 |                 ans = a[i];
      |                        ^
main.c:37:1: error: expected 'while' at end of input
   37 | }
      | ^
main.c:37:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
int main()
{
    int a, b, ans;
    int a_divisor[1000000000], b_divisor[1000000000];
    int i, j
 
    scanf("%d %d", &a, &b);
 
    for(i = 1; i < a; i = i + 1){
        if(a%i == 0){
            a_divisior += [a/i];
        }
    }
 
    for(i = 1; i < b; i = i + 1){
        if(b%i == 0){
            b_divisior += [b/i];
        }
    }
 
    ans = 0;
    i = 0;
    do {
        j = 0;
        do {
            if (a[i] == b[j]){
                ans = a[i];
            j += 1;
        } while(ans == 0);
        i += 1;
    } while(ans == 0);
 
    printf("%d", ans);
 
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    8 |     scanf("%d %d", &a, &b);
      |     ^~~~~
main.c:12:13: error: 'a_divisior' undeclared (first use in this function); did you mean 'a_divisor'?
   12 |             a_divisior += [a/i];
      |             ^~~~~~~~~~
      |             a_divisor
main.c:12:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:27: error: expected expression before '[' token
   12 |             a_divisior += [a/i];
      |                           ^
main.c:18:13: error: 'b_divisior' undeclared (first use in this function); did you mean 'b_divisor'?
   18 |             b_divisior += [b/i];
      |             ^~~~~~~~~~
      |             b_divisor
main.c:18:27: error: expected expression before '[' token
   18 |             b_divisior += [b/i];
      |                           ^
main.c:25:9: error: 'j' undeclared (first use in this function)
   25 |         j = 0;
      |         ^
main.c:27:18: error: subscripted value is neither array nor pointer nor vector
   27 |             if (a[i] == b[j]){
      |                  ^
main.c:28:24: error: subscripted value is neither array nor pointer nor vector
   28 |                 ans = a[i];
      |                        ^
main.c:37:1: error: expected 'while' at end of input
   37 | }
      | ^
main.c:37:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
int main()
{
    int a, b, ans;
    int a_divisor[1000000000], b_divisor[1000000000];
    int i, j;
 
    scanf("%d%d", &a, &b);
 
    for(i = 1; i < a; i++){
        if(a%i == 0){
            a_divisior += [a/i];
        }
    }
 
    for(i = 1; i < b; i++){
        if(b%i == 0){
            b_divisior += [b/i];
        }
    }
 
    ans = 0;
    i = 0;
    do {
        j = 0;
        do {
            if (a[i] == b[j]){
                ans = a[i];
            j += 1;
        } while(ans == 0);
        i += 1;
    } while(ans == 0);
 
    printf("%d", ans);
 
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:13: error: 'a_divisior' undeclared (first use in this function); did you mean 'a_divisor'?
   12 |             a_divisior += [a/i];
      |             ^~~~~~~~~~
      |             a_divisor
main.c:12:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:27: error: expected expression before '[' token
   12 |             a_divisior += [a/i];
      |                           ^
main.c:18:13: error: 'b_divisior' undeclared (first use in this function); did you mean 'b_divisor'?
   18 |             b_divisior += [b/i];
      |             ^~~~~~~~~~
      |             b_divisor
main.c:18:27: error: expected expression before '[' token
   18 |             b_divisior += [b/i];
      |                           ^
main.c:27:18: error: subscripted value is neither array nor pointer nor vector
   27 |             if (a[i] == b[j]){
      |                  ^
main.c:27:26: error: subscripted value is neither array nor pointer nor vector
   27 |             if (a[i] == b[j]){
      |                          ^
main.c:28:24: error: subscripted value is neither array nor pointer nor vector
   28 |                 ans = a[i];
      |                        ^
main.c:37:1: error: expected 'while' at end of input
   37 | }
      | ^
main.c:37:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:5:3: error: expected declaration specifiers before 'scanf'
    5 |   scanf("%d %d", &x, &y);
      |   ^~~~~
main.c:6:3: error: expected declaration specifiers before 'while'
    6 |   while(1){
      |   ^~~~~
main.c:17:3: error: expected declaration specifiers before 'printf'
   17 |   printf("%d\n", x);
      |   ^~~~~~
main.c:18:1: error: expected declaration specifiers before '}' token
   18 | }
      | ^
main.c:4:18: error: declaration for parameter 'box' but no such parameter
    4 |   int x, y, gcd, box;
      |                  ^~~
main.c:4:13: error: declaration for parameter 'gcd' but no such parameter
    4 |   int x, y, gcd, box;
      |             ^~~
main.c:4:10: error: declaration for parameter 'y' but no such parameter
    4 |   int x, y, gcd, box;
      |          ^
main.c:4:7: error: declaration for parameter 'x' but no such parameter
    4 |   int x, y, gcd, box;
      |       ^
main.c:20: error: expected '{' at end of input
Language: C

#include <stdio.h>

int main(){

  int x, y, z;

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

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

  while(y > 0){
    z = x%y;
    x = y;
    y = z;
  }

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

    

Compiler output:
main.c:15:3: error: expected identifier or '(' before 'while'
   15 |   while(y > 0){
      |   ^~~~~
main.c:21:10: error: expected declaration specifiers or '...' before string constant
   21 |   printf("%d\n", x);
      |          ^~~~~~
main.c:21:18: error: unknown type name 'x'
   21 |   printf("%d\n", x);
      |                  ^
main.c:23:3: error: expected identifier or '(' before 'return'
   23 |   return 0;
      |   ^~~~~~
main.c:24:1: error: expected identifier or '(' before '}' token
   24 | }
      | ^
Language: C

#include <stdio.h>
int main()
{
    int a, b, ans;
    int a_divisor[1000000000], b_divisor[1000000000];
    int i, j;
    int count = 0;
 
    scanf("%d%d", &a, &b);
 
    for(i = 1; i < a; i++){
        if(a%i == 0){
            a_divisior[count] = [a/i];
            count = count + 1;
        }
    }
 
    for(i = 1; i < b; i++){
        if(b%i == 0){
            b_divisior += [b/i];
        }
    }
 
    ans = 0;
    i = 0;
    do {
        j = 0;
        do {
            if (a[i] == b[j]){
                ans = a[i];
            j += 1;
        } while(ans == 0);
        i += 1;
    } while(ans == 0);
 
    printf("%d", ans);
 
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:13: error: 'a_divisior' undeclared (first use in this function); did you mean 'a_divisor'?
   13 |             a_divisior[count] = [a/i];
      |             ^~~~~~~~~~
      |             a_divisor
main.c:13:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:33: error: expected expression before '[' token
   13 |             a_divisior[count] = [a/i];
      |                                 ^
main.c:20:13: error: 'b_divisior' undeclared (first use in this function); did you mean 'b_divisor'?
   20 |             b_divisior += [b/i];
      |             ^~~~~~~~~~
      |             b_divisor
main.c:20:27: error: expected expression before '[' token
   20 |             b_divisior += [b/i];
      |                           ^
main.c:29:18: error: subscripted value is neither array nor pointer nor vector
   29 |             if (a[i] == b[j]){
      |                  ^
main.c:29:26: error: subscripted value is neither array nor pointer nor vector
   29 |             if (a[i] == b[j]){
      |                          ^
main.c:30:24: error: subscripted value is neither array nor pointer nor vector
   30 |                 ans = a[i];
      |                        ^
main.c:39:1: error: expected 'while' at end of input
   39 | }
      | ^
main.c:39:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
int main()
{
    int a, b, ans;
    int a_divisor[1000000000];
    int b_divisor[1000000000];
    int i, j;
    int count = 0;
 
    scanf("%d%d", &a, &b);
 
    for(i = 1; i < a; i++){
        if(a%i == 0){
            a_divisior[count] = [a/i];
            count = count + 1;
        }
    }
 
    for(i = 1; i < b; i++){
        if(b%i == 0){
            b_divisior += [b/i];
        }
    }
 
    ans = 0;
    i = 0;
    do {
        j = 0;
        do {
            if (a[i] == b[j]){
                ans = a[i];
            j += 1;
        } while(ans == 0);
        i += 1;
    } while(ans == 0);
 
    printf("%d", ans);
 
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:13: error: 'a_divisior' undeclared (first use in this function); did you mean 'a_divisor'?
   14 |             a_divisior[count] = [a/i];
      |             ^~~~~~~~~~
      |             a_divisor
main.c:14:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:33: error: expected expression before '[' token
   14 |             a_divisior[count] = [a/i];
      |                                 ^
main.c:21:13: error: 'b_divisior' undeclared (first use in this function); did you mean 'b_divisor'?
   21 |             b_divisior += [b/i];
      |             ^~~~~~~~~~
      |             b_divisor
main.c:21:27: error: expected expression before '[' token
   21 |             b_divisior += [b/i];
      |                           ^
main.c:30:18: error: subscripted value is neither array nor pointer nor vector
   30 |             if (a[i] == b[j]){
      |                  ^
main.c:30:26: error: subscripted value is neither array nor pointer nor vector
   30 |             if (a[i] == b[j]){
      |                          ^
main.c:31:24: error: subscripted value is neither array nor pointer nor vector
   31 |                 ans = a[i];
      |                        ^
main.c:40:1: error: expected 'while' at end of input
   40 | }
      | ^
main.c:40:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
int main()
{
    int a, b, ans;
    int a_divisor[1000000000];
    int b_divisor[1000000000];
    int i, j;
    int count = 0;
 
    scanf("%d%d", &a, &b);
 
    for(i = 1; i < a; i++){
        if(a%i == 0){
            a_divisor[count] = [a/i];
            count = count + 1;
        }
    }
 
    for(i = 1; i < b; i++){
        if(b%i == 0){
            b_divisor += [b/i];
        }
    }
 
    ans = 0;
    i = 0;
    do {
        j = 0;
        do {
            if (a_divisor[i] == b_divisor[j]){
                ans = a_divisor[i];
            j += 1;
        } while(ans == 0);
        i += 1;
    } while(ans == 0);
 
    printf("%d", ans);
 
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:32: error: expected expression before '[' token
   14 |             a_divisor[count] = [a/i];
      |                                ^
main.c:21:26: error: expected expression before '[' token
   21 |             b_divisor += [b/i];
      |                          ^
main.c:40:1: error: expected 'while' at end of input
   40 | }
      | ^
main.c:40:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
int main()
{
    int a, b, ans;
    int a_divisor[1000000000];
    int b_divisor[1000000000];
    int i, j;
    int count = 0;
 
    scanf("%d%d", &a, &b);
 
    for(i = 1; i < a; i++){
        if(a%i == 0){
            a_divisor[count] = [a/i];
            count = count + 1;
        }
    }
 
    for(i = 1; i < b; i++){
        if(b%i == 0){
            b_divisor += [b/i];
        }
    }
 
    ans = 0;
    i = 0;
    do {
        j = 0;
        do {
            if (a_divisor[i] == b_divisor[j]){
                ans = a_divisor[i];
            }
            j += 1;
        } while(ans == 0);
        i += 1;
    } while(ans == 0);
 
    printf("%d", ans);
 
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:32: error: expected expression before '[' token
   14 |             a_divisor[count] = [a/i];
      |                                ^
main.c:21:26: error: expected expression before '[' token
   21 |             b_divisor += [b/i];
      |                          ^
Language: C

#include <stdio.h>

int main(void)
{
  int a, b, c;
  int j = 1;

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

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

  for (int i = 1; i <= a; i++) {
    if(a % i == 0 && b % i == 0){
       c[j] = i;
       j = j + 1;
    }
  }

  for(i = 1; i <= j; i++){
    if(d < c[i]){
      d = c[i]
    }
  }

 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:6: error: 'd' undeclared (first use in this function)
   11 |      d = b;
      |      ^
main.c:11:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:9: error: subscripted value is neither array nor pointer nor vector
   18 |        c[j] = i;
      |         ^
main.c:23:7: error: 'i' undeclared (first use in this function)
   23 |   for(i = 1; i <= j; i++){
      |       ^
main.c:25:15: error: expected ';' before '}' token
   25 |       d = c[i]
      |               ^
      |               ;
   26 |     }
      |     ~
Language: C

#include <stdio.h>

int main(void)
{
  int a, b, c;
  int j = 0;

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

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

  for (int i = 1; i <= a; i++) {
    if(a % i == 0 && b % i == 0){
       c[j] = i;
       j = j + 1;
    }
  }

  for(i = 0 i <= j; i++){
    if(d < c[i]){
      d = c[i];
    }
  }

 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:6: error: 'd' undeclared (first use in this function)
   11 |      d = b;
      |      ^
main.c:11:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:9: error: subscripted value is neither array nor pointer nor vector
   18 |        c[j] = i;
      |         ^
main.c:23:7: error: 'i' undeclared (first use in this function)
   23 |   for(i = 0 i <= j; i++){
      |       ^
main.c:23:12: error: expected ';' before 'i'
   23 |   for(i = 0 i <= j; i++){
      |            ^~
      |            ;
main.c:23:24: error: expected ';' before ')' token
   23 |   for(i = 0 i <= j; i++){
      |                        ^
      |                        ;
Language: C

#include<stdio.h>

int main(void)
{
  int a, b , x, i, ans = 1;
  scanf("%d %d"&a, &b);
  if(a > b) {
    x = a;
    a = b;
    b = x;
  }
  i = 2;
  while (i <= a) { 
    if (a % i == 0 && b % i == 0) {
      a /= i;
      b /= i;
      ans *= i;
      i = 1;
    }
    i++;
  }
  printf("%d\n",ans);
  return 0;

}

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

#include <stdio.h>

int main(void)
{
  int a, b, c;
  int j = 0;

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

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

  for (int i = 1; i <= a; i++) {
    if(a % i == 0 && b % i == 0){
       c[j] = i;
       j = j + 1;
    }
  }

  for(i = 0; i <= j; i++){
    if(d < c[i]){
      d = c[i];
    }
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:6: error: 'd' undeclared (first use in this function)
   11 |      d = b;
      |      ^
main.c:11:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:9: error: subscripted value is neither array nor pointer nor vector
   18 |        c[j] = i;
      |         ^
main.c:23:7: error: 'i' undeclared (first use in this function)
   23 |   for(i = 0; i <= j; i++){
      |       ^
Language: C

#include<stdio.h>

int main(void)
{
  int a, b , x, i, ans;
  scanf("%d %d"&a, &b);
  if(a > b) {
    x = a;
    a = b;
    b = x;
  }
  ans = 1;
  i = 2;
  while (i <= a) { 
    if (a % i == 0 && b % i == 0) {
      a /= i;
      b /= i;
      ans *= i;
      i = 1;
    }
    i++;
  }
  printf("%d\n",ans);
  return 0;

}

Compiler output:
main.c: In function 'main':
main.c:6:16: error: invalid operands to binary & (have 'char *' and 'int')
    6 |   scanf("%d %d"&a, &b);
      |         ~~~~~~~^
      |         |
      |         char *