Răspuns:
#include <iostream>
using namespace std;
int main() {
int v[100],n,i;
cin >> n;
for(i=1;i<=n;i++)
cin >> v[i];
for(i=1;i<=n;i++) {
if(v[i]<0)
v[i]=v[i]*v[i];
else if(v[i]>0)
v[i]=v[i]*5;
else v[i]=2;
}
for(i=1;i<=n;i++)
cout << v[i] << " ";
}