toate 4 repede vă rog!!!

a) cin >> x;
if (x<0) E=3*x-1;
else E=2-x;
cout << E;
si asa faci si celelalte... sau sunt alte cerinte ?