Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace apps
- {
- class Program
- {
- static void Main(string[] args)
- {
- static string Get() { return Console.ReadLine(); }
- //-------------------------------------------------------
- string[] nums = Get().Split(' '); int size = nums.Length;
- int[] biggestNums = new int[nums.Length];
- int counter = 0;
- for (int i = 0; i < size-1; i++)
- {
- for (int x = i+1; x < size; x++)
- {
- int first = Convert.ToInt32(nums[i]);
- int second = Convert.ToInt32(nums[x]);
- if (first > second) { biggestNums[counter] = first; counter++; }
- }
- }
- for (int i = 0; i < counter; i++)
- {
- Console.Write($"{biggestNums[i]} ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement