C# Program to Find Greatest Numbers in an Array using WHERE Clause LINQ Last Updated : 18 Oct, 2021 Comments Improve Suggest changes Like Article Like Report LINQ is known as Language Integrated Query and it is introduced in .NET 3.5. It gives the ability to .NET languages to generate queries to retrieve data from the data source. It removes the mismatch between programming languages and databases and the syntax used to create a query is the same no matter which type of data source is used. In this article, we will learn how to find the greatest numbers in an array using WHERE Clause LINQ. Here, we will get the numbers that are greater than a particular number in the given array. Example: Input: Array of Integers: 100,200,300,450,324,56,77,890 Value: 500 Output: Numbers greater than 500 are: 890 Input: Array of Integers: 34,56,78,100,200,300,450,324,56,77,890 Value: 100 Output: Numbers greater than 100 are: 200,300,450,324,890 Approach: To display the greatest numbers in an array using WHERE Clause LINQ follow the following approach: Store integer(input) in an array.The sum of the elements is calculated using the for loop.The numbers which are greater than particular value is checked using where function.By using the LINQ query we will store the numbers in an iterator.Now the iterator is iterated and the integers are printed. Example: C# // C# program to print the greatest numbers in an array // using WHERE Clause LINQ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class GFG{ static void Main() { // Array of numbers int[] array1 = { 34, 56, 78, 100, 200, 300, 450, 324, 56, 77, 890 }; // Now get the numbers greater than 100 and // store in big variable using where clause var big = from value in array1 where value > 100 select value; Console.WriteLine("Numbers that are greater than 100 are :"); // Get the greater numbers foreach (var s in big) { Console.Write(s.ToString() + " "); } Console.Read(); } } Output: Numbers that are greater than 100 are : 200 300 450 324 890 Comment More infoAdvertise with us Next Article C# Program to Find Greatest Numbers in an Array using WHERE Clause LINQ G gottumukkalabobby Follow Improve Article Tags : C# CSharp LINQ CSharp-programs Similar Reads C# Program to Print the Numbers Greater Than 786 in an Integer Array using LINQ Language-Integrated Query (LINQ) is a uniform query syntax in C# to retrieve data from different sources. It eliminates the mismatch between programming languages and databases and also provides a single querying interface for different types of data sources. In this article, we will learn how to di 2 min read Golang Program to Find Largest Element in an Array The task is to find the largest element of an array in Golang by taking input values from the user. Example: Input: Enter the number of elements: 4 Enter the number : 40 Enter the number : 69 Enter the number : 89 Enter the number : -54 Output: The largest number is : 89 In this program, the user ne 2 min read C# Program to Print Only Those Numbers Whose Value is Less Than Average of all Elements in an Integer Array using LINQ Language-Integrated Query (LINQ) is a uniform query syntax in C# to retrieve data from different sources. It eliminates the mismatch between programming languages and databases and also provides a single querying interface for different types of data sources. In this article, we will learn how to pr 2 min read C# Program to Print the Employees Whose ID is Greater Than 101 Using LINQ LINQ is known as Language Integrated Query and it is introduced in .NET 3.5. It gives the ability to .NET languages to generate queries to retrieve data from the data source. It removes the mismatch between programming languages and databases and the syntax used to create a query is the same no matt 3 min read How to Get Index of Greatest Value in an Array in JavaScript ? In this article, we will see how to return the index for the greatest value in an array with the help of JavaScript. To return the index of the greatest value in an array using JavaScript.Some of the examples are to return the index of the greatest value in an array.Example: The greatest value in th 4 min read Like