fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int[] arr = new int[] {-15,-20,-323,-222,-4};
  8. int max = arr[0];
  9. foreach (int value in arr) {
  10. if (value > max) max = value;
  11. }
  12. Console.WriteLine(max);
  13. }
  14. }
Success #stdin #stdout 0.04s 23936KB
stdin
Standard input is empty
stdout
-4