Write a C# program to find the largest and lowest values from three integer values
- برمجة سي شارب
- برمجة
- 2021-05-15
- MarwaMohammed
الأجوبة
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
public class Exercise39 {
static void Main(string[] args)
{
Console.WriteLine("\nInput first integer:");
int x = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Input second integer:");
int y = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Input third integer:");
int z = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Largest of three: "+Math.Max(x, Math.Max(y, z)));
Console.WriteLine("Lowest of three: "+Math.Min(x, Math.Min(y, z)));
}
}أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال
