#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;


// Перераспределить значения переменных
void Pr(double &x, double &y, double &z)
{
	std::vector<double> v;
	
	v.push_back(x);
	v.push_back(y);
	v.push_back(z);
	
	std::sort ( v.begin(), v.end() ); 
	
	x = v[0];
	y = v[1];
	z = v[2];	
}



int main()
{
	double x=7, y=1, z=4;
	
	cout << "x=" << x << endl;
	cout << "y=" << y << endl;
	cout << "z=" << z << endl;
	
	Pr(x, y, z);
	
	cout << "x=" << x << endl;
	cout << "y=" << y << endl;
	cout << "z=" << z << endl;
	
	return 0;
}