Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Advanced
- {
- class Program
- {
- static void Main(string[] args)
- {
- Func<IEnumerable<int>, IEnumerable<int>> sort = x => x.Where(n => n % 2 == 0)
- .OrderBy(n => n)
- .Concat(x.Where(m => m % 2 != 0)
- .OrderBy(m => m));
- Console.WriteLine(string.Join(" ", sort(Console.ReadLine()
- .Split()
- .Select(int.Parse))));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment