using System;
using System.Linq;
public class Program
{
private static int calculate_dot_product(int[] arr1, int[] arr2) {
return arr1.Zip(arr2, (n1, n2) => n1 * n2).Sum();
}
public static void Main(string[] args)
{
int[] arr1 = new int[] {1, 4, 8, 9, 6};
int[] arr2 = new int[] {0, 7, 1, 3, 40};
Console.Write("Dot product = {0:D}", calculate_dot_product(arr1, arr2));
}
}
/*
run:
Dot product = 303
*/