Language: C

include <stdio.h>
#define MAX 500000
#define SENTINEL 2000000000

int L[25002], R[25002],count = 0, A[MAX],n;

void merge(int, int, int);
void mergeSort(int, int);

int main()
{
  int i;

  scanf("%d",&n);

  for(i = 0; i < n; i++) {
    scanf("%d",&A[i]);
  }
  mergeSort(0, n);
  for(i = 0; i < n - 1 ; i++) {
    printf("%d",A[i]);
  }
  printf("%d ", A[n - 1]);
  printf("\n");
  printf("%d\n",count);
  return 0;
}


void mergeSort(int left, int right) {
  int mid;
  if(left+1 < right) {
    mid =(left + right) / 2;
    mergeSort(left, mid);
    mergeSort(mid, right);
    merge(left, mid, right);
  }
}

void merge(int left, int mid, int right) {
  int n1,n2,i,j,k;

  n1 = mid - left;
  n2 = right - mid;

  for(i = 0; i < n1; i++) {
    L[i] = A[left+i];
  } for(i = 0; i < n2; i++) {
    R[i] = A[mid+i];
  }
  L[n1] = SENTINEL;
  L[n2] = SENTINEL;

  i = 0;
  j = 0;

  for(k = left; k < right; k++) {
    if(L[i] <= R[j]) {
      A[k] = L[i++];
            count++;
    }
    else{
      A[k] = R[j++];
            count++;
    }
  }
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'main':
main.c:14:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   14 |   scanf("%d",&n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include <stdio.h>
main.c:14:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   14 |   scanf("%d",&n);
      |   ^~~~~
main.c:14:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:15: error: 'n' undeclared (first use in this function)
   14 |   scanf("%d",&n);
      |               ^
main.c:14:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:17: error: 'A' undeclared (first use in this function)
   17 |     scanf("%d",&A[i]);
      |                 ^
main.c:21:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   21 |     printf("%d",A[i]);
      |     ^~~~~~
main.c:21:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:21:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:23:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   23 |   printf("%d ", A[n - 1]);
      |   ^~~~~~
main.c:23:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:17: error: 'count' undeclared (first use in this function)
   25 |   printf("%d\n",count);
      |                 ^~~~~
main.c: In function 'merge':
main.c:47:5: error: 'L' undeclared (first use in this function)
   47 |     L[i] = A[left+i];
      |     ^
main.c:47:12: error: 'A' undeclared (first use in this function)
   47 |     L[i] = A[left+i];
      |            ^
main.c:49:5: error: 'R' undeclared (first use in this function)
   49 |     R[i] = A[mid+i];
      |     ^
main.c:60:13: error: 'count' undeclared (first use in this function)
   60 |             count++;
      |             ^~~~~