using System;
public class Program
{
public static void Main()
int [] x={1,2,0,0,4,0};
int k=0;
for(int i=0;i<x.Length-k;i++)
if(x[i]==0)
for(int j=i; j<x.Length-1;j++)
x[j]=x[j+1];
}
x[x.Length-1]=0;
if(i>0)i--;
k++;
Console.WriteLine(x);