Skip to content

Instantly share code, notes, and snippets.

@Filkolev
Created May 27, 2015 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Filkolev/b29f6587a99867327b44 to your computer and use it in GitHub Desktop.
Save Filkolev/b29f6587a99867327b44 to your computer and use it in GitHub Desktop.
The Numbers
using System;
using System.Linq;
using System.Text.RegularExpressions;
public class TheNumbers
{
public static void Main()
{
var numbers = Regex.Split(Console.ReadLine(), @"[^0-9]+")
.Where(x => x != string.Empty)
.Select(number => string.Format("0x{0:X4}", int.Parse(number)));
Console.WriteLine(string.Join("-", numbers));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment