Friday, 1 December 2017

C# Program to Find Minimum and Maximum of Numbers


Code:

using System;
using System.Linq;
class Program
{
    static void Main()
    {
        int[] array1 = { 10, -10, -20, 0,15,20,30 };
        Console.WriteLine("Maximum Element : " +array1.Max());
        Console.WriteLine("Minimum Element : " +array1.Min());
        Console.Read();
    }
}


Output:

Maximum Element : 30
Minimum Element : -20


More C# Programs:



















100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...