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

#include <stdio.h>

int main(void)
{
  int a, b;
  int c[100];
  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:12:6: error: 'd' undeclared (first use in this function)
   12 |      d = b;
      |      ^
main.c:12:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:7: error: 'i' undeclared (first use in this function)
   24 |   for(i = 0; i <= j; i++){
      |       ^
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:21:26: error: expected expression before '[' token
   21 |             b_divisor += [b/i];
      |                          ^
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:23: error: assignment to expression with array type
   21 |             b_divisor += b/i;
      |                       ^~
Language: C

#include <stdio.h>

int main(void)
{
  int a, b, d;
  int c[100];
  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];
    }
  }

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:7: error: 'i' undeclared (first use in this function)
   24 |   for(i = 0; i <= j; i++){
      |       ^
main.c:24:7: note: each undeclared identifier is reported only once for each function it appears in
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;
        }
    }

    count = ;
    for(i = 1; i < b; i++){
        if(b%i == 0){
            b_divisor[count] = b/i;
            count = count + 1;
        }
    }
 
    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:19:13: error: expected expression before ';' token
   19 |     count = ;
      |             ^
Language: C

#include <stdio.h>

int main(void)
{
  int a, b;
  int d = 0;
  int c[100];
  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];
    }
  }

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:7: error: 'i' undeclared (first use in this function)
   25 |   for(i = 0; i <= j; i++){
      |       ^
main.c:25:7: note: each undeclared identifier is reported only once for each function it appears in
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 = a / i;
      b = b / i;
      ans = 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;
  int d = 0;
  int c[100];
  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];
    }
  }

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

  return 0;
}

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

#include <stdio.h>

int main(void)
{
  int a, b;
  int d = 0;
  int c[100];
  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];
    }
  }

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

  return 0;
}

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

#include <stdio.h>

int main(void){

int x,y,z,a,b;

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

if(x>=y){
z=x%y;
a=y%z;
if(y%a)
}
else{
z=y%x;
a=x%z;
}
printf("%d\n",a);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:1: error: expected expression before '}' token
   13 | }
      | ^
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;
        }
    }
  
    count = 0;
    for(i = 1; i =< b; i++){
        if(b%i == 0){
            b_divisor[count] = b/i;
            count = count + 1;
        }
    }
   
    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:12:19: error: expected expression before '<' token
   12 |     for(i = 1; i =< a; i++){
      |                   ^
main.c:20:19: error: expected expression before '<' token
   20 |     for(i = 1; i =< b; i++){
      |                   ^
Language: C

#include <stdio.h>
int main()
{
    int a, b, ans;
    int a_divisor[1000000000];
    int b_divisor[1000000000];
    int i, j;
    int count_a, count_b;
    
    scanf("%d %d", &a, &b);

    count _a = 0;
    for(i = 1; i <= a; i++){
        if(a%i == 0){
            a_divisor[count] = a/i;
            count_a = count_a + 1;
        }
    }
   
    count_b = 0;
    for(i = 1; i <= b; i++){
        if(b%i == 0){
            b_divisor[count] = b/i;
            count_b = count_b + 1;
        }
    }
    
    ans = 0;
    i = 0;
    do {
        j = 0;
        do {
            if (a_divisor[i] == b_divisor[j]){
                ans = a_divisor[i];
            }
            j += 1;
        } while(ans == 0 && j <= count_b);
        i += 1;
    } while(ans == 0 && i <= count_a);
    
    printf("%d", ans);
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:5: error: unknown type name 'count'
   12 |     count _a = 0;
      |     ^~~~~
main.c:15:23: error: 'count' undeclared (first use in this function); did you mean 'count_b'?
   15 |             a_divisor[count] = a/i;
      |                       ^~~~~
      |                       count_b
main.c:15:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:12:5: error: unknown type name 'count'
   12 |     count _a = 0;
      |     ^~~~~
main.c:15:23: error: 'count' undeclared (first use in this function); did you mean 'count_b'?
   15 |             a_divisor[count] = a/i;
      |                       ^~~~~
      |                       count_b
main.c:15:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main()
{
   int x, y, i, j;

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

   if(x > y){
      for(i=x; i>=1; i--){
         if(x%i == 0)
      }
      for(j=x; j>=1; j--){
         if(y%j == 0)
      }
      if(i == j){
         printf("%d\n", i);
         return;
      }
   }

   else if(x < y){
      for(i=y; i>=1; i--){
         if(x%i == 0)
      }
      for(j=y; j>=1; j--){
         if(y%j == 0)
      }
      if(i == j){
         printf("%d\n", i);
         return;
      }
   }

   return 0;
}



         

Compiler output:
main.c: In function 'main':
main.c:12:7: error: expected expression before '}' token
   12 |       }
      |       ^
main.c:15:7: error: expected expression before '}' token
   15 |       }
      |       ^
main.c:18:10: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   18 |          return;
      |          ^~~~~~
main.c:3:5: note: declared here
    3 | int main()
      |     ^~~~
main.c:25:7: error: expected expression before '}' token
   25 |       }
      |       ^
main.c:28:7: error: expected expression before '}' token
   28 |       }
      |       ^
main.c:31:10: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   31 |          return;
      |          ^~~~~~
main.c:3:5: note: declared here
    3 | int main()
      |     ^~~~
Language: C

#include<stdio.h>

int main()
{
   int x, y, i, j;

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

   if(x > y)
      for(i=x; i>=1; i--)
         if(x%i == 0){
            j = i;
            for(j=i; j>=1; j--)
               if(y%j == 0){
                  printf("%d\n", j);
                  return;
               }
         }

   else if(x < y){
      for(i=y; i>=1; i--)
         if(x%i == 0){
            j = i;
            for(j=i; j>=1; j--)
               if(y%j == 0){
                  printf("%d\n", i);
                  return;
               }
         }

   return 0;
}



         

Compiler output:
main.c: In function 'main':
main.c:16:19: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   16 |                   return;
      |                   ^~~~~~
main.c:3:5: note: declared here
    3 | int main()
      |     ^~~~
main.c:27:19: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   27 |                   return;
      |                   ^~~~~~
main.c:3:5: note: declared here
    3 | int main()
      |     ^~~~
main.c:32:1: error: expected declaration or statement at end of input
   32 | }
      | ^
Language: C

#include<stdio.h>

int main()
{
   int x, y, i, j;

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

   if(x > y)
      for(i=x; i>=1; i--){
         if(x%i == 0){
            j = i;
            for(j=i; j>=1; j--){
               if(y%j == 0){
                  printf("%d\n", j);
                  return;
               }
            }
         }
      }
   }

   else if(x < y){
      for(i=y; i>=1; i--){
         if(x%i == 0){
            j = i;
            for(j=i; j>=1; j--){
               if(y%j == 0){
                  printf("%d\n", i);
                  return;
               }
            }
         }
      }
   }

   return 0;
}



         

Compiler output:
main.c: In function 'main':
main.c:16:19: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   16 |                   return;
      |                   ^~~~~~
main.c:3:5: note: declared here
    3 | int main()
      |     ^~~~
main.c: At top level:
main.c:23:4: error: expected identifier or '(' before 'else'
   23 |    else if(x < y){
      |    ^~~~
main.c:37:4: error: expected identifier or '(' before 'return'
   37 |    return 0;
      |    ^~~~~~
main.c:38:1: error: expected identifier or '(' before '}' token
   38 | }
      | ^
Language: C

#include<stdio.h>

int main()
{
   int x, y, i, j;

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

   if(x > y)
      for(i=x; i>=1; i--){
         if(x%i == 0){
            j = i;
            for(j=i; j>=1; j--){
               if(y%j == 0){
                  printf("%d\n", j);
                  return;
               }
            }
         }
      }
   }

   else if(x < y){
      for(i=y; i>=1; i--){
         if(x%i == 0){
            j = i;
            for(j=i; j>=1; j--){
               if(y%j == 0){
                  printf("%d\n", j);
                  return;
               }
            }
         }
      }
   }

   return 0;
}



         

Compiler output:
main.c: In function 'main':
main.c:16:19: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   16 |                   return;
      |                   ^~~~~~
main.c:3:5: note: declared here
    3 | int main()
      |     ^~~~
main.c: At top level:
main.c:23:4: error: expected identifier or '(' before 'else'
   23 |    else if(x < y){
      |    ^~~~
main.c:37:4: error: expected identifier or '(' before 'return'
   37 |    return 0;
      |    ^~~~~~
main.c:38:1: error: expected identifier or '(' before '}' token
   38 | }
      | ^
Language: C

#include<stdio.h>

int main()
{
   int x, y, i, j;

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

   if(x > y)
      for(i=1; i<=x; i++){
         if(y%i == 0){
            j = i;
            for(j=i; j>=1; j--){
               if(x%j == 0){
                  printf("%d\n", j);
                  return;
               }
            }
         }
      }
   }

   else if(x < y){
      for(i=y; i>=1; i--){
         if(x%i == 0){
            j = i;
            for(j=i; j<=y; j++){
               if(y%j == 0){
                  printf("%d\n", j);
                  return;
               }
            }
         }
      }
   }

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:19: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   16 |                   return;
      |                   ^~~~~~
main.c:3:5: note: declared here
    3 | int main()
      |     ^~~~
main.c: At top level:
main.c:23:4: error: expected identifier or '(' before 'else'
   23 |    else if(x < y){
      |    ^~~~
main.c:37:4: error: expected identifier or '(' before 'return'
   37 |    return 0;
      |    ^~~~~~
main.c:38:1: error: expected identifier or '(' before '}' token
   38 | }
      | ^
Language: C

#include<stdio.h>

int main()
{
   int x, y, i, j;

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

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

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

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:19: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   16 |                   return;
      |                   ^~~~~~
main.c:3:5: note: declared here
    3 | int main()
      |     ^~~~
main.c: At top level:
main.c:23:4: error: expected identifier or '(' before 'else'
   23 |    else if(x < y){
      |    ^~~~
main.c:37:4: error: expected identifier or '(' before 'return'
   37 |    return 0;
      |    ^~~~~~
main.c:38:1: error: expected identifier or '(' before '}' token
   38 | }
      | ^
Language: C

#include<stdio.h>

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

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

   if(x >= y){
      for(i=y; i>=1; i--){
         if(y%i == 0){
            if(x%i == 0){
               printf("%d\n", i);
               return 0;
            }
         }
      }
   }

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

#include<stdio.h>

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

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

   else if(x > y){
      for(i=x%y; i>=1; i--){
         if((x%y)%i == 0){
            if(y%i == 0){
               printf("%d\n", i);
               return 0;
            }
         }
      }
   }

   else if(x < y){
      for(i=y%x; i>=1; i--){
         if((y%x)%i == 0){
            if(x%i == 0){
               printf("%d\n", i);
               return 0;
            }
         }
      }
   }

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

}

Compiler output:
main.c: In function 'main':
main.c:9:4: error: 'else' without a previous 'if'
    9 |    else if(x > y){
      |    ^~~~
Language: C

#include<stdio.h>

int main()
{
   int x, y, i, X, Y;

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

   else if(x > y){
      X = x%y;
      for(i=X; i>=1; i--){

         if(X%i == 0){
            if(y%i == 0){
               printf("%d\n", i);
               return 0;
            }
         }
      }
   }

   else if(x < y){
      Y = y%x;
      for(i=Y; i>=1; i--){
         if(Y%i == 0){
            if(x%i == 0){
               printf("%d\n", i);
               return 0;
            }
         }
      }
   }

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

}

Compiler output:
main.c: In function 'main':
main.c:9:4: error: 'else' without a previous 'if'
    9 |    else if(x > y){
      |    ^~~~
Language: C

#include <stdio.h>
#define NUM 100000

int main(void)
{
  int a,b;
  int gcd;
  int i;
  int j = 0;
  int k = 0;
  int c[NUM];
  int d[NUM];

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

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

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

  if(j > k) {
    for(i = 0; i < j; i++) {
      for(l = 0; l < k; l++) {
        if(c[i] == d[l]) {
          gcd = c[i];
        }
      }
    }
  } else {
    for(i = 0; i < k; i++) {
      for(l = 0; l < j; l++) {
        if(d[i] == c[l]) {
          gcd = c[i];
        }
      }
    }
  }

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

  return 0;
}

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

#include <stdio.h>

int main(void)
{
    int x,y,r;

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

        gcd(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:9:9: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
    9 |         gcd(x, y)
      |         ^~~
main.c:9:18: error: expected ';' before 'if'
    9 |         gcd(x, y)
      |                  ^
      |                  ;
   10 |             if x < y
      |             ~~    
main.c:12:19: error: expected '(' before 'y'
   12 |             while y > 0
      |                   ^
      |                   (
Language: C

#include <stdio.h>

int main(void)
{
    int x,y,r;

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

        gcd(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:9:9: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
    9 |         gcd(x, y);
      |         ^~~
main.c:10:16: error: expected '(' before 'x'
   10 |             if x < y
      |                ^
      |                (
main.c:12:19: error: expected '(' before 'y'
   12 |             while y > 0
      |                   ^
      |                   (
Language: C

#include <stdio.h>

int main(void)
{
    int x,y,r;

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

        gcd(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:9:9: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
    9 |         gcd(x, y);
      |         ^~~
main.c:11:16: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   11 |                swap(x, y);
      |                ^~~~
main.c:12:19: error: expected '(' before 'y'
   12 |             while y > 0
      |                   ^
      |                   (
Language: C

#include <stdio.h>

int main(void)
{
    int x,y,r;

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

        gcd(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:9:9: error: implicit declaration of function 'gcd' [-Wimplicit-function-declaration]
    9 |         gcd(x, y);
      |         ^~~
main.c:11:16: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   11 |                swap(x, y);
      |                ^~~~
Language: C

#include <stdio.h>

int main(void)
{
    int x,y,r,gcd,swap;

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

        gcd(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:9:9: error: called object 'gcd' is not a function or function pointer
    9 |         gcd(x, y);
      |         ^~~
main.c:5:15: note: declared here
    5 |     int x,y,r,gcd,swap;
      |               ^~~
main.c:11:16: error: called object 'swap' is not a function or function pointer
   11 |                swap(x, y);
      |                ^~~~
main.c:5:19: note: declared here
    5 |     int x,y,r,gcd,swap;
      |                   ^~~~
Language: C

#include <stdio.h>

int main(void)
{
    int x,y,r;

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


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

            return x;
           }
           }

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

    return 0;
}

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

#include <stdio.h>

int main(void)
{
    int x,y,r,s;

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

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

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

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

     return 0
}

Compiler output:
main.c: In function 'main':
main.c:16:16: error: expected ')' before '!' token
   16 |         while(s! = 0){
      |              ~ ^
      |                )
main.c:24:14: error: expected ';' before '}' token
   24 |      return 0
      |              ^
      |              ;
   25 | }
      | ~
Language: C

#include <stdio.h>

int main(void)
{
    int x,y,r,s;

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

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

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

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

     return 0
}

Compiler output:
main.c: In function 'main':
main.c:24:14: error: expected ';' before '}' token
   24 |      return 0
      |              ^
      |              ;
   25 | }
      | ~
Language: C

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

   int x, y, r, tmp;
 
   scanf("%d %d", &x, &y);
 
   if (a < b){
     tmp = x;
     x = y;
     y = tmp;
   }
 
   r = x % y;

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

Compiler output:
main.c: In function 'main':
main.c:9:8: error: 'a' undeclared (first use in this function)
    9 |    if (a < b){
      |        ^
main.c:9:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:12: error: 'b' undeclared (first use in this function)
    9 |    if (a < b){
      |            ^
Language: C

#include<stdio.h>

int main(void)
{

 int x, y,tmp;

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

 if(x < y){

  tmp = x;

  x = y;

  y = tmp;

 }

 r = x % y;

 while(r!=0){

  x = y;

  y = r;

  r = x % y;

 }

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

 return 0;

}

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

#include<stdio.h>

int main(void)
{

 int x, y, z, tmp;

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

 if(x < y){

  tmp = x;

  x = y;

  y = tmp;

 }

 z = x % y;

 while(z!=0){

  x = y;

  y = r;

  z = x % y;

 }

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

 return 0;

}

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

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

int x,y,d=0;
scanf("%d %d ",&x,%y);

if(x>y){

 while(d>0;d++){

  if(x/d==0&&x/y%d==0)
    break;
}
 printf("%d",d);

}

else{

while(d>0;d++){

  if(x/d==0&&x/y%d==0)
    break;
}
 printf("%d",d);

}

Compiler output:
main.c: In function 'main':
main.c:5:19: error: expected expression before '%' token
    5 | scanf("%d %d ",&x,%y);
      |                   ^
main.c:9:11: error: expected ')' before ';' token
    9 |  while(d>0;d++){
      |       ~   ^
      |           )
main.c:20:10: error: expected ')' before ';' token
   20 | while(d>0;d++){
      |      ~   ^
      |          )
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
Language: C

#include <stdio.h>

int main () {
   int x, y, z, a,b,c, swap;

   c = 0;

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

   if (x < y) {
      a = y;
      b = x
   }else{
      a = x;
      b = y;
   }


   while(1) {
      c = a % b;

      if(c == 0){
         printf("%d\n", b);
         break;
      }
      
      a = b;
      b = c;
   }
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:12: error: expected ';' before '}' token
   12 |       b = x
      |            ^
      |            ;
   13 |    }else{
      |    ~
Language: C

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

int x,y,d=0;
scanf("%d %d ",&x,&y);

if(x>y){

 while(d>0;d++){

  if(x/d==0&&x/y%d==0)
    break;
}
 printf("%d",d);

}

else{

while(d>0;d++){

  if(x/d==0&&x/y%d==0)
    break;
}
 printf("%d",d);

}

Compiler output:
main.c: In function 'main':
main.c:9:11: error: expected ')' before ';' token
    9 |  while(d>0;d++){
      |       ~   ^
      |           )
main.c:20:10: error: expected ')' before ';' token
   20 | while(d>0;d++){
      |      ~   ^
      |          )
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
Language: C

#include <stdio.h>

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

   c = 0;

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

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


   while(1) {
      z = x % y;

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

Compiler output:
main.c: In function 'main':
main.c:6:4: error: 'c' undeclared (first use in this function)
    6 |    c = 0;
      |    ^
main.c:6:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:7: error: 'z' undeclared (first use in this function)
   18 |       z = x % y;
      |       ^
Language: C

#include <stdio.h>

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

   z = 0;

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

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


   while(1) {
      z = x % y;

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

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

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

int x,y,d=0;
scanf("%d %d ",&x,&y);

if(x>y){

 while(d>0){

  if(x/d==0&&x/y%d==0)
    break;

     d++;
}
 printf("%d",d);

}

else{

while(d>0;d++){

  if(x/d==0&&x/y%d==0)
    break;
}
 printf("%d",d);

}

Compiler output:
main.c: In function 'main':
main.c:22:10: error: expected ')' before ';' token
   22 | while(d>0;d++){
      |      ~   ^
      |          )
main.c:29:1: error: expected declaration or statement at end of input
   29 | }
      | ^
Language: C

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

int x,y,d=0;
scanf("%d %d ",&x,&y);

if(x>y){

 while(d>0){

  if(x/d==0&&x/y%d==0)
    break;

     d++;
}
 printf("%d",d);

}

else{

while(d>0){

  if(x/d==0&&x/y%d==0)
    break;
  d++;
}
 printf("%d",d);

}

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

#include <stdio.h>

int gcd(int a,int b)
{
    if (a < b){
        swap(x, y)
    while (y > 0){
        r = a % b;
        a = b;
        b = r;
    }
    return x;
    }
}
int main(void)
{
     int a,b;
     
     scanf("%d %d",&a,&b);
     
     printf("%d\n",gcd(a,b));

     return 0;
}

Compiler output:
main.c: In function 'gcd':
main.c:6:9: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
    6 |         swap(x, y)
      |         ^~~~
main.c:6:14: error: 'x' undeclared (first use in this function)
    6 |         swap(x, y)
      |              ^
main.c:6:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:17: error: 'y' undeclared (first use in this function)
    6 |         swap(x, y)
      |                 ^
main.c:6:19: error: expected ';' before 'while'
    6 |         swap(x, y)
      |                   ^
      |                   ;
    7 |     while (y > 0){
      |     ~~~~~
Language: C

#include <stdio.h>

int gcd(int a,int b)
{
    if (a < b){
        swap(a, b)
    while (y > 0){
        r = a % b;
        a = b;
        b = r;
    }
    return x;
    }
}
int main(void)
{
     int a,b;
     
     scanf("%d %d",&a,&b);
     
     printf("%d\n",gcd(a,b));

     return 0;
}

Compiler output:
main.c: In function 'gcd':
main.c:6:9: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
    6 |         swap(a, b)
      |         ^~~~
main.c:6:19: error: expected ';' before 'while'
    6 |         swap(a, b)
      |                   ^
      |                   ;
    7 |     while (y > 0){
      |     ~~~~~
Language: C

#include <stdio.h>

int gcd(int a,int b)
{
    if (a < b){
        swap(a, b);
    while (y > 0){
        r = a % b;
        a = b;
        b = r;
    }
    return x;
    }
}
int main(void)
{
     int a,b;
     
     scanf("%d %d",&a,&b);
     
     printf("%d\n",gcd(a,b));

     return 0;
}

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

#include <stdio.h>

int gcd(int a,int b)
{
    if (a < b){
        swap(a, b);
    while (b > 0){
        r = a % b;
        a = b;
        b = r;
    }
    return x;
    }
}
int main(void)
{
     int a,b;
     
     scanf("%d %d",&a,&b);
     
     printf("%d\n",gcd(a,b));

     return 0;
}

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

#include <stdio.h>

int gcd(int a,int b)
{
    int r;
    if (a < b){
        swap(a, b);
    while (b > 0){
        r = a % b;
        a = b;
        b = r;
    }
    return x;
    }
}
int main(void)
{
     int a,b;
     
     scanf("%d %d",&a,&b);
     
     printf("%d\n",gcd(a,b));

     return 0;
}

Compiler output:
main.c: In function 'gcd':
main.c:7:9: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
    7 |         swap(a, b);
      |         ^~~~
main.c:13:12: error: 'x' undeclared (first use in this function)
   13 |     return x;
      |            ^
main.c:13:12: 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 r;
    if (a < b){
        swap(a, b);
    while (b > 0){
        r = a % b;
        a = b;
        b = r;
    }
    return a;
    }
}
int main(void)
{
     int a,b;
     
     scanf("%d %d",&a,&b);
     
     printf("%d\n",gcd(a,b));

     return 0;
}

Compiler output:
main.c: In function 'gcd':
main.c:7:9: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
    7 |         swap(a, b);
      |         ^~~~
Language: C

#include <stdio.h>

int main (void)
{

int x,y,s,r;

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

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

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

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:17:8: error: expected ')' before '!' token
   17 | while(r! = 0){
      |      ~ ^
      |        )
main.c:19:3: error: 'b' undeclared (first use in this function)
   19 |   b = r;
      |   ^
main.c:19:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main (void)
{

int x,y,s,r;

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

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

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

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:17:8: error: expected ')' before '!' token
   17 | while(r! = 0){
      |      ~ ^
      |        )
main.c:20:3: error: 'b' undeclared (first use in this function)
   20 |   b = r;
      |   ^
main.c:20:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main() {

   int x, y, m, n;
   
   scanf("%d %d", &x, &y)
   while(1) {
       if (x >= y){
            x = x % y;
            if (x == 0){
                 printf("%d", y);
                 break;
            }
       }
       else {
            y=  y % x;
            if (y == 0){
                  printf("%d", x);
                  break;
            }
       }
   }
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:26: error: expected ';' before 'while'
    7 |    scanf("%d %d", &x, &y)
      |                          ^
      |                          ;
    8 |    while(1) {
      |    ~~~~~
Language: C

#include <stdio.h>

int main (void)
{

int x,y,s,r;

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

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

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

return 0;

}

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

#include <stdio.h>

int main() {

   int x, y, m, n;
   
   scanf("%d %d", &x, &y)
   while(1) {
       if (x >= y){
            x = x % y;
            if (x == 0){
                 printf("%d\n", y);
                 break;
            }
       }
       else {
            y=  y % x;
            if (y == 0){
                  printf("%d\n", x);
                  break;
            }
       }
   }
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:26: error: expected ';' before 'while'
    7 |    scanf("%d %d", &x, &y)
      |                          ^
      |                          ;
    8 |    while(1) {
      |    ~~~~~
Language: C


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

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


  if(a<b){ 

    ans = a; 
    a = b; 
    b = ans; 


  } 
  r = a % b; 


  while(r!=0){ 

    a = b; 
    b = c; 
    c = a % b; 


  } 

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

  return 0; 
} 

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


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

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


  if(a<b){ 

    ans = a; 
    a = b; 
    b = ans; 


  } 
  c = a % b; 


  while(r!=0){ 

    a = b; 
    b = c; 
    c = a % b; 


  } 

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

  return 0; 
} 

Compiler output:
main.c: In function 'main':
main.c:21:9: error: 'r' undeclared (first use in this function)
   21 |   while(r!=0){
      |         ^
main.c:21:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main() {

   int x, y;
   
   scanf("%d %d", &x, &y)
   while(1) {
       if (x >= y){
            x = x % y;
            if (x == 0){
                 printf("%d\n", y);
                 break;
            }
       }
       else {
            y=  y % x;
            if (y == 0){
                 printf("%d\n", x);
                 break;
            }
       }
   }
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:26: error: expected ';' before 'while'
    7 |    scanf("%d %d", &x, &y)
      |                          ^
      |                          ;
    8 |    while(1) {
      |    ~~~~~
Language: C

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

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

    printf("%d",r);

Compiler output:
main.c: In function 'main':
main.c:16:4: error: expected '}' before 'else'
   16 |    else if(y>x){
      |    ^~~~
main.c:25:5: error: expected declaration or statement at end of input
   25 |     printf("%d",r);
      |     ^~~~~~
main.c:25:5: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>

int main(void)
{
  int n,x;
  int i,j,k;
  int sum;

  scanf(???%d %d???, &n,&x);

  while(n != 0 && x != 0) {
    sum = 0;
    for(i = 1; i <= n-2; i++) {
      for(j = i+1; j <= n-1; j++) {
        for(k = j+1; k <= n; k++) {
          if(i + j + k == x)
            sum = sum + 1;
          }
        }
      }
    }
    printf(???%d\n???, sum);
    scanf(???%d %d???, &n, &x);
    }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: expected expression before '?' token
    9 |   scanf(???%d %d???, &n,&x);
      |         ^
main.c:22:12: error: expected expression before '?' token
   22 |     printf(???%d\n???, sum);
      |            ^
main.c:22:17: error: stray '\' in program
   22 |     printf(???%d\n???, sum);
      |                 ^
main.c:23:11: error: expected expression before '?' token
   23 |     scanf(???%d %d???, &n, &x);
      |           ^
main.c: At top level:
main.c:26:3: error: expected identifier or '(' before 'return'
   26 |   return 0;
      |   ^~~~~~
main.c:27:1: error: expected identifier or '(' before '}' token
   27 | }
      | ^
Language: C

#include<stdio.h>

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

  for (i=min; i>1; i--) {
    if (x%i==0 && y%i==0) {
      printf("%d", i);
      break;
    }
  }
  return 0;
}

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

#include <stdio.h>

int main(void)  {
  int i, j = 1, d = 0, r, x, y;
  scanf("%d %d", &x, &y);
  
  if (x > y)  {
    r = x % y;
    max = x;
  }
  else  {
    r = y % x;
    max = y;
  }

  for (i = 1; i <= max; i++)  {
    if (r % d == 0)  {
      d = i * j;
      j = i;
    }
  }  
     
  printf("%d?\n", d);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:5: error: 'max' undeclared (first use in this function)
    9 |     max = x;
      |     ^~~
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(void)  {
  int i, j = 1, d = 0, r, x, y;
  scanf("%d %d", &x, &y);
  
  if (x > y)  {
    r = x % y;
    max = x;
  }
  else  {
    r = y % x;
    max = y;
  }

  for (i = 1; i <= max; i++)  {
    if (r % i == 0)  {
      d = i * j;
      j = i;
    }
  }  
     
  printf("%d?\n", d);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:5: error: 'max' undeclared (first use in this function)
    9 |     max = x;
      |     ^~~
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(void)  {
  int x, y, r, tmp;
  if (a < b){
      tmp = x;
      x = y;
      y = tmp;
  }
 
  r = x % y;
  while(r!=0){
    x = y;
    y = r;
    r = x % y;
  }

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:7: error: 'a' undeclared (first use in this function)
    5 |   if (a < b){
      |       ^
main.c:5:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:11: error: 'b' undeclared (first use in this function)
    5 |   if (a < b){
      |           ^
Language: C

#include <stdio.h>

int main(void)  {
  int x, y, r, tmp;
  scanf("%d %d", &x, &y);
  if (a < b){
      tmp = x;
      x = y;
      y = tmp;
  }
 
  r = x % y;
  while(r!=0){
    x = y;
    y = r;
    r = x % y;
  }

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: 'a' undeclared (first use in this function)
    6 |   if (a < b){
      |       ^
main.c:6:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:11: error: 'b' undeclared (first use in this function)
    6 |   if (a < b){
      |           ^
Language: C

#include <stdio.h>

int main(void)
{
  int x,y;

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

    while (y > 0){
        r = x % y
        x = y
        y = r

    return x
    }
  printf("%d",r);

  return 0;
}

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

#include <stdio.h>

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

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

    while (y > 0){
        r = x % y
        x = y
        y = r

    return x
    }
  printf("%d",r);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
    9 |         swap(x, y);
      |         ^~~~
main.c:12:18: error: expected ';' before 'x'
   12 |         r = x % y
      |                  ^
      |                  ;
   13 |         x = y
      |         ~
Language: C

#include <stdio.h>

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

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

    while (y > 0){
        r = x % y;
        x = y;
        y = r;

    return x;
    }
  printf("%d",r);

  return 0;
}

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

#include <stdio.h>

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

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

  return 0;
}

Compiler output:
main.c:20:10: error: expected declaration specifiers or '...' before string constant
   20 |   printf("%d",r);
      |          ^~~~
main.c:20:15: error: unknown type name 'r'
   20 |   printf("%d",r);
      |               ^
main.c:22:3: error: expected identifier or '(' before 'return'
   22 |   return 0;
      |   ^~~~~~
main.c:23:1: error: expected identifier or '(' before '}' token
   23 | }
      | ^