Advertisement
RukoLob

Untitled

Aug 21st, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 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.  * наибольший элемент в массиве*/
  8. namespace ConsoleApp4
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.            Console.WriteLine(Method(1,2,6,3,5));
  15.         }
  16.         static int Method(params int[] array)
  17.         {
  18.             int maxValue = array.Max<int>();
  19.             return maxValue;
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement