Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace TopIntegers
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] arr = Console.ReadLine().Split().Select(int.Parse).ToArray();
- for (int i = 0; i < arr.Length; i++)
- {
- bool isBigger = true;
- int current = arr[i];
- for (int j = i + 1; j < arr.Length; j++)
- {
- if (arr[j] >= current)
- {
- isBigger = false;
- break;
- }
- }
- if (isBigger)
- {
- Console.Write(current + " ");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement