程序应该没问题,但就是运行不了,向大佬求助

我实在不知道怎么形容,大佬们直接看图吧图片说明
#include
using namespace std;
void merge( int list1[],int size1, int list2[],int size2,int list3[])
{
int i=0;
int x,y;
y=0;
while(y {
while(i {
if(list1[i]>list1[i+1])
{
x=list1[i+1],list1[i+1]=list1[i],list1[i]=x;
}
i++;

}
i=0;
y++;
}
y=i=0;
while(y {
while(i {
if(list2[i]>list2[i+1])
{
x=list2[i+1],list2[i+1]=list2[i],list2[i]=x;
}
i++;

}
i=0;
y++;
}
i=0;
while(i {
if(i {
list3[i]=list1[i];
}
else if(i>=size1&&i {
list3[i]=list2[i-size1];
}
i++;
}
y=i=0;
while(y {
while(i {
if(list2[i]>list2[i+1])
{
x=list2[i+1],list2[i+1]=list2[i],list2[i]=x;
}
i++;

}
i=0;
y++;
}
}
int main(int argc, char** argv) {
int i=0;
int N,M,K;
int l1[N],l2[M],l3[K];
cout<<"Enter list1:";
cin>>N;
cout<<"Enter list2:";
cin>>M;
while(i {
cin>>l1[i];
i++;
}
i=0;
while(i {
cin>>l2[i];
i++;
}
K=M+N;
merge(l1,N,l2,M,l3);
i=0;
cout<<"The merged list is ";
while(i<N+M)
{
cout<<l3[i];
i++;
}
return 0;
}
然后调试

图片说明
图片说明