public class drake
{
public int Max(ref int a, ref int b, ref int c,out int min,out int medium)
{
int max = 0;
medium = 0;
min = 0;
if (a > b && b > c)
{
max = a;
medium = b;
min = c;
}
if (a < b && b < c)
{
max = c;
medium = b;
min = a;
}
if (a > b && b < c && a > c)
{
max = a;
medium = c;
min = b;
}
if (a > b && b < c && a < c)
{
max = c;
medium = a;
min = b;
}
return max;
}
}
class Program
{
static void Main(string[] args)
{
drake c = new drake();
int q = 5;
int w = 9;
int e = 6;
int medium;
int min;
int max = c.Max(ref q, ref w, ref e, out min, out medium);
Console.WriteLine(max+"+"+medium+"+"+min);
}
}
}