On systems of elliptic equations involving subcritical or critical Sobolev exponents