这个归并排序为什么不行啊

#include

void sort(int arr[],int left,int right){
int mid=(right+left)/2;
if(left
sort(arr,left,mid);
sort(arr,mid+1,right);
mer(arr,left,mid,right);
}
}

void mer(int arr[],int left,int mid,int right){
int temp[right-left+1];
int point=right ;
int point2=mid;
for(int a=0;a
temp[a]=arr[left+a];
}

   while(right>mid&&mid>left){
       if(temp[right-left]>temp[point2-left]){
           arr[point]=temp[right-left];
           right--;
           point--;
       }else{
           arr[point]=temp[point2-left];
           point2--;
           point--;


    }

    if(rightwhile(point2>=left){
           arr[point]=temp[point2-left];
           point--;
           point2--;
        }
    }else{
        while(right>=mid){
           arr[point]=temp[right-left];
           right--;
           point--;
        }

    }

   }

}
int main(){
int num;
void mer();
void sort();
scanf("%d",&num);
int arr[num];
for(int a=0;a
scanf("%d",&arr[a]);
}
sort(arr,0,num-1);
return 0;
}

你怎么知道不行的啊?你也没输出最后排序的结果啊

你没有使用printf打印查看排序后的数组,mer函数定义了但是没调用