#include "pch.h"
#include
using namespace std;
template
T f(T *a, T *b, int n)
{
T s = (T)0;
for (int i = 0; i < n; i++)
s += a[i] * b[i];
return s;
}
void main()
{
double c[5] = { 1.1,2.2,3.3,4.4,5.5 }, d[5] = { 10.0,100.0,1000.0 };
cout << f(c, d, 5) << endl;
}