Creating Main Class
The Main Class in this case similar with before. But this time we will using sumBitDifferences function.
public static void Main()
{
int[] arr = { 1, 3, 5 };
int n = arr.Length;
Console.WriteLine("The sum is " + sumBitDifferences(arr, n));
}