Hello ladies and gents,
I wanted to ask if this piece of code can be written differently then the way I did:
template <class V>
void sequence3(V &a, V &b, V &c)
{
V w;
while (a > b || b > c)
{
if (a > b){w = b; b = a; a = w;}
if (b > c){w = c; c = b; b = w;}
if (a > c){w = a; a = c; c = w;}
}
}