Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- int[] array = { 3, 7, 2, 15, 11, 82, 64, 31 };
- int maxInt = Int32.MinValue;
- for (int i = 0; i<array.Length; i++)
- {
- int value = array[i];
- if (value > maxInt)
- {
- maxInt = value;
- }
- }
- Console.WriteLine($"Najveci element niza je: {maxInt}");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement