Advertisement
Guest User

Untitled

a guest
May 4th, 2015
797
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace SortArrayOfNum_1
  8. {
  9.     class SortArrayOfNum_1
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string input=Console.ReadLine();
  14.             int[] numbers = input.Split().Select(int.Parse).ToArray();
  15.  
  16.             //build-in sorting method
  17.             Array.Sort(numbers);
  18.             foreach (var num in numbers)
  19.             {
  20.                 Console.Write(num+" ");
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement