public void arrangeNum(int[] list, int iNum)
while (eInd < iNum && list[eInd] % 2 == 0)
while (oInd < iNum && list[oInd] % 2 == 1)
if (eInd < iNum && oInd < iNum)
public void displayArray(int[] dlist, int iNum)
for (int i = 0; i < iNum; i++)
Console.Write(dlist[i] + " ");
public static void Main()
placeSwap swap = new placeSwap();
Console.WriteLine("Input: ");
string[] iiii = Console.ReadLine().Split(' ');
int first, sec, third, frth, fth;
first = int.Parse(iiii[0]);
sec = int.Parse(iiii[1]);
third = int.Parse(iiii[2]);
frth = int.Parse(iiii[3]);
fth = int.Parse(iiii[4]);
int[] ctoInt = Array.ConvertAll(iiii, s => int.Parse(s));
while (ite < ctoInt.Length - 1)
if (ctoInt[ite] % 2 == 0)
swap.arrangeNum(ctoInt, ctoInt.Length);
Console.WriteLine("Output: ");
swap.displayArray(ctoInt, ctoInt.Length);