Advertisement
Guest User

24

a guest
Sep 2nd, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. /***************************************************************
  2.  *
  3.  * 24. Write a program that reads a list of words,
  4.  * separated by spaces and prints the list in an
  5.  * alphabetical order.
  6.  *
  7.  ***************************************************************/
  8.  
  9. using System;
  10. using System.Linq;
  11.  
  12. class PrintListInOrder
  13. {
  14.     static void Main()
  15.     {
  16.         Console.WriteLine(String.Join(" ", Console.ReadLine().Split(' ').OrderBy(x => x)));
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement