a)
void insert(int *const a, const int &size)
{
for (int i = 0; i < size; ++i) {
cin >> a[i];
}
}
б)
const int &sum(int *const x, int *const y)
{
insert(x, 5);
insert(y, 5);
int sum = 0;
for (int i = 0; i < 5; ++i) {
sum += abs(x[i] - y[i]);
}
return sum;
}