Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace MyNamespace
- {
- class Program
- {
- static void Main()
- {
- int max = int.MinValue;
- int[] arr = new int[5] { 2, 35, 6, 8, 9 };
- for (int i = 0; i < arr.Length; i++)
- {
- if (arr[i] > max)
- {
- max = arr[i];
- }
- }
- System.Console.Write("max: ");
- System.Console.WriteLine(max);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement