//Author: Suresh Babu
//To find the biggest number in array (Single dimentional)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication15
{
class Program
{
static void Main(string[] args)
{
int[] arr1 = new int[5];
for (int y = 0; y < arr1.Length; y++)
{
arr1[y] = int.Parse(Console.ReadLine());
}
int x = arr1.Max();
Console.WriteLine("The biggest number of array is" + x);
}
}
}
//To find the biggest number in array (Single dimentional)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication15
{
class Program
{
static void Main(string[] args)
{
int[] arr1 = new int[5];
for (int y = 0; y < arr1.Length; y++)
{
arr1[y] = int.Parse(Console.ReadLine());
}
int x = arr1.Max();
Console.WriteLine("The biggest number of array is" + x);
}
}
}
No comments:
Post a Comment