Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace PrintAllUniqueElementsInArray
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] numbers = Console.ReadLine().Split().Select(int.Parse).ToArray();
- var newArray = numbers.OrderByDescending(x => x).ToArray();
- Console.WriteLine(newArray[0]);
- Console.WriteLine(newArray[1]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement