# Untitled

unknown
plain_text
a month ago
1.6 kB
5
Indexable
Never
```#include<bits/stdc++.h>
using namespace std;

int main()
{
int a,b,c,d,e,f,maximum,minimum,middle;
cin >> a >> b >> c;
cin >> d >> e >> f;
if(a>=b && a>=c)
{
if(b>c)
{
maximum=a;
middle = b;
minimum =c;
}
else
{
maximum=a;
middle = c;
minimum =b;
}
}
else if(b>=a && b>= c)
{
if(a>c)
{
maximum=b;
middle = a;
minimum =c;
}
else
{
maximum=b;
middle = c;
minimum =a;
}
}
else if(c>=a && c>=b)
{
if(a>b)
{
maximum=c;
middle = a;
minimum =b;
}
else
{
maximum=c;
middle = b;
minimum =a;
}
}
if(d== 1 && e== 2 && f == 3)
{
cout << maximum << " " << middle << " " << minimum << endl;
}
else if(d== 1 && e== 3 && f == 2)
{
cout << maximum << " " << minimum << " " << middle << endl;
}
else if(d== 2 && e== 1 && f == 3)
{
cout << middle << " " << maximum << " " << minimum << endl;
}
else if(d== 2 && e== 3 && f == 1)
{
cout << middle << " " << minimum << " " << maximum << endl;
}
else if(d== 3 && e== 1 && f == 2)
{
cout << minimum << " " << maximum << " " << middle << endl;
}
else if(d== 3 && e== 2 && f == 1)
{
cout << minimum << " " << middle << " " << maximum << endl;
}
return 0;
}
```