//This is my code,how do i find & print max value
namespace StartCSharp
{
class Program
{
static void Main(string[] args)
{
int [, ] a = new int [4,4] {{2,3,4,5}, {34,56,25,67}, {22,44,55,77},{45,80,22,13}};
foreach (int x in a)
Console.WriteLine(x);
}
}
}
///Thank you.
aluhnev
0
Junior Poster in Training
Recommended Answers
Jump to PostYou can try this
int[,] a = new int[4, 4] { { 2, 3, 4, 5 }, { 34, 56, 25, 67 }, { 22, 44, 55, 77 }, { 45, 80, 22, 13 } }; Console.WriteLine(a.Cast<int>().Max());
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.