kirililchev3

Sort Numbers

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