Language: C

  i = 0;
  j = 0;
  for(k=left; k<right; k++){
    count++;
    if(L[i] <= R[j]){
      A[k] = L[i];
      i = i + 1;
    }
    else{
      A[k] = R[j];
      j = j + 1;
      mcount += n1 - i;
    }
  }
  free(L);
  free(R);
  return mcount;
}


int mergeSort(int A[],int left,int right){
  int mid,a,b,c;
  if(left+1 < right){
    mid = (left + right) / 2;
    a = mergeSort(A,left,mid);
    b = mergeSort(A,mid,right);
    c = merge(A,left,mid,right);
    return a+b+c;
  }
  else return 0;
}

int main(){
  int i,n;
  int answer;

  scanf("%d",&n);
  for(i=0; i<n; i++) scanf("%d",&A[i]);
  answer = mergeSort(A,0,n);

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

  return 0;

}

Compiler output:
main.c:1:3: warning: data definition has no type or storage class
    1 |   i = 0;
      |   ^
main.c:1:3: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:2:3: warning: data definition has no type or storage class
    2 |   j = 0;
      |   ^
main.c:2:3: error: type defaults to 'int' in declaration of 'j' [-Wimplicit-int]
main.c:3:3: error: expected identifier or '(' before 'for'
    3 |   for(k=left; k<right; k++){
      |   ^~~
main.c:3:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    3 |   for(k=left; k<right; k++){
      |                ^
main.c:3:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    3 |   for(k=left; k<right; k++){
      |                         ^~
main.c:15:3: warning: data definition has no type or storage class
   15 |   free(L);
      |   ^~~~
main.c:15:3: error: type defaults to 'int' in declaration of 'free' [-Wimplicit-int]
main.c:15:3: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
main.c:15:3: warning: conflicting types for built-in function 'free'; expected 'void(void *)' [-Wbuiltin-declaration-mismatch]
main.c:1:1: note: 'free' is declared in header '<stdlib.h>'
  +++ |+#include <stdlib.h>
    1 |   i = 0;
main.c:16:3: warning: data definition has no type or storage class
   16 |   free(R);
      |   ^~~~
main.c:16:3: error: type defaults to 'int' in declaration of 'free' [-Wimplicit-int]
main.c:16:3: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
main.c:17:3: error: expected identifier or '(' before 'return'
   17 |   return mcount;
      |   ^~~~~~
main.c:18:1: error: expected identifier or '(' before '}' token
   18 | }
      | ^
main.c: In function 'mergeSort':
main.c:27:9: error: implicit declaration of function 'merge' [-Wimplicit-function-declaration]
   27 |     c = merge(A,left,mid,right);
      |         ^~~~~
main.c: In function 'main':
main.c:37:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   37 |   scanf("%d",&n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 |   i = 0;
main.c:37:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   37 |   scanf("%d",&n);
      |   ^~~~~
main.c:37:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:38:34: error: 'A' undeclared (first use in this function)
   38 |   for(i=0; i<n; i++) scanf("%d",&A[i]);
      |                                  ^
main.c:38:34: note: each undeclared identifier is reported only once for each function it appears in
main.c:41:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   41 |   printf("%d\n",answer);
      |   ^~~~~~
main.c:41:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:41:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:41:3: note: include '<stdio.h>' or provide a declaration of 'printf'