VelizarAvramov

05. Sort Numbers

Dec 2nd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. namespace _05._Sort_Numbers
  6. {
  7.     class SortNumbers
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.             List<decimal> input = Console.ReadLine()
  12.                 .Split(' ')
  13.                 .Select(decimal.Parse)
  14.                 .ToList();
  15.  
  16.             input.Sort();
  17.             Console.WriteLine(string.Join(" <= ", input));
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment