سی شارپ
با سلام
میخواهم با استفاده از سی شارپ به ساده ترین روش برنامه ای بنویسم که دو عدد را از کاربر دریافت کند و سپس بزرگترین عدد ان را نشان دهدو بعد از ان کوچکترین عدد را
static void Main(string[] args)
{
int a, b;
Console.WriteLine("please enter the first number");
a = int.Parse(Console.ReadLine());
Console.WriteLine("please enter the second number");
b = int.Parse(Console.ReadLine());
if (a > b)
{
Console.WriteLine(a);
Console.WriteLine(b);
}
else
{
Console.WriteLine(b);
Console.WriteLine(a);
}
Console.ReadKey();
}