#include <iostream>
using namespace std;
int main()
{
int n;
cout << "n="; cin >> n;
int a[n+1], b[n+1], c[n+1], i;
for(i=1;i<=n;i++)
{
cout << "a[" << i << "]=";
cin >> a[i];
}
for(i=1;i<=n;i++)
{
cout << "b[" << i << "]=";
cin >> b[i];
}
//a) b) c) aici inlocuiesti cu rezolvarile de mai jos
for(i=1;i<=n;i++)
{
cout << c[i] << " ";
}
return 0;
}
a)for(i=1;i<=n;i++)
{
c[i]=a[i]-b[i];
if(c[i]<0) c[i]=(-1)*c[i];
}
b)for(i=1;i<=n;i++)
{
if(a[i]>b[i]) c[i]=a[i];
else c[i]=b[i];
}
c)for(i=1;i<=n;i++)
{
if(a[i]>b[n-i-1]) c[i]=b[n-i-1];
else c[i]=a[i];
}