public static void Main()
Console.WriteLine("Hello World");
Console.WriteLine("Enter the size of array");
size=Int32.Parse(Console.ReadLine());
int[] inputarr=new int[size];
Console.WriteLine("Enter the element in the array");
inputarr[i]=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Element of the array are as below");
foreach(int j in inputarr)
static void Switching(int[] arr)
for(i=0;i<arr.Length;i++)
if(arr[i]%2==0&&arr[0]==arr[i])
else if(arr[i]%2!=0&&arr[1]==arr[i])
Console.WriteLine("Elements are switching" );
Console.WriteLine("Elements are not switching" );