using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bai_7_sgkt26
{
class Program
{
static void DoiCho(ref int a, ref int b)
{
if (a > b)
{
int tg = a;
a = b;
b = tg;
}
}
static void Main(string[] args)
{
int a,b,c;
Console.Write("nhap a,b,c:");
a = int.Parse(Console.ReadLine());
b = int.Parse(Console.ReadLine());
c = int.Parse(Console.ReadLine());
if (a > b) DoiCho(ref a, ref b);
if (a > c) DoiCho(ref a, ref c);
if (b > c) DoiCho(ref b, ref c);
Console.Write("ket qua la:{0},{1},{2}", a, b, c);
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bai_7_sgkt26
{
class Program
{
static void DoiCho(ref int a, ref int b)
{
if (a > b)
{
int tg = a;
a = b;
b = tg;
}
}
static void Main(string[] args)
{
int a,b,c;
Console.Write("nhap a,b,c:");
a = int.Parse(Console.ReadLine());
b = int.Parse(Console.ReadLine());
c = int.Parse(Console.ReadLine());
if (a > b) DoiCho(ref a, ref b);
if (a > c) DoiCho(ref a, ref c);
if (b > c) DoiCho(ref b, ref c);
Console.Write("ket qua la:{0},{1},{2}", a, b, c);
Console.ReadKey();
}
}
}