Quick actions

cmd+k|ctrl+k

Navigation

Languages

lab4(158)

Snippet info

Language

Cpp

Visibility

public

Author

andrusus.korotkovus

Created

2018-10-15T20:26:05Z

Updated

2018-10-15T20:26:05Z

#include <iostream>
using namespace std;

int main() {
    int x, y, z;
    cin>>x>>y>>z;
    if(x+y+z< 1) {
        if(x<y<z) {
            x = (y+z)/2;
        } else if(y<x<z){
            y = (x+z)/2;
        } else{
            z = (x+y)/2;
        }
    } else if(x<y) {
        x = (y+z)/2;
    } else {
        y = (x+z)/2;
    }
    cout<<x<<y<<z;
}
INFO