SHARE
TWEET

Untitled

a guest Oct 10th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace TopIntegers
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             int[] numsArray = Console.ReadLine().Split(" ").Select(int.Parse).ToArray();
  11.  
  12.             for (int i = 0; i < numsArray.Length; i++)
  13.             {
  14.                 bool isBigger = true;
  15.                 for (int j = i+1; j < numsArray.Length; j++)
  16.                 {
  17.                     if (numsArray[i] <= numsArray[j])
  18.                     {
  19.                         isBigger = false;
  20.                     }
  21.                 }
  22.                 if (isBigger)
  23.                 {
  24.                     Console.Write(numsArray[i] + " ");
  25.                 }
  26.             }
  27.         }
  28.     }
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top