Guest User

Untitled

a guest
Feb 22nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Task_3._3._4
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int[] numbers = { 12, 2, 7, 24, 5 };
  14. int max = numbers[0];
  15.  
  16. for (int i = 0; i < numbers.Length; i++)
  17. {
  18. if (numbers[i] > max)
  19. {
  20. max = numbers[i];
  21. }
  22. }
  23. Console.WriteLine($"Max number in array {max}");
  24.  
  25. Console.ReadLine();
  26. }
  27. }
  28. }
Add Comment
Please, Sign In to add comment