Quick actions

cmd+k|ctrl+k

Navigation

Languages

Lab_4

Snippet info

Language

Cpp

Visibility

public

Author

sergey

Created

2019-10-13T14:42:05Z

Updated

2019-10-13T14:50:04Z

#include <iostream>
using namespace std;

int main() {
    double x,y,z,S,min2;
    cin>>x>>y>>z;
    S=x+y+z;
  if (S<1){
    if(y<x && y<z){y=(x+z)/2;}
    if(z<x && z<y){z=(x+y)/2;}
    if(x<z && x<y){x=(z+y)/2;}
  }
    else {
        if (x<y){x=(z+y)/2;}
        else {y=(x+z)/2;}
    }
    cout<<"x = "<<x<<endl<<"y = "<<y<<endl<<"z = "<<z<<endl;
    return 0;
}
INFO