fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. float x,y,z;
  6. cin>>x>>y>>z;
  7. float E1=x+y+z;
  8. cout << "E1 = x + y + z = "<<E1<<endl;
  9. float E2=x*y + y*z + z*x;
  10. cout << "E2=x*y + y*z + z*x = "<<E2<<endl;
  11. float E3= (x + y) / (z + 1);
  12. z==-1 ? cout<<"Erro : Mau = 0" : cout << "E3= (x + y) / (z + 1) = "<<E3;
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5292KB
stdin
1 2 3
stdout
E1 = x + y + z = 6
E2=x*y + y*z + z*x = 11
E3= (x + y) / (z + 1) = 0.75