Skip to content

Instantly share code, notes, and snippets.

@AlbertoMonteiro
Created February 8, 2017 12:37
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 AlbertoMonteiro/2252b7ee048134843046c4ad3fa8c224 to your computer and use it in GitHub Desktop.
Save AlbertoMonteiro/2252b7ee048134843046c4ad3fa8c224 to your computer and use it in GitHub Desktop.
Sorteio Kart
var pessoas = new[] { "Douglas", "Cj", "Adn", "Alberto", "Miqueias", "Douglas C.", "Júnior Lessa", "Btn", "Psc", "Leandro", "Franklin" };
var r = new Random();
Console.WriteLine(string.Join(Environment.NewLine, pessoas.Select(p => Tuple.Create(p, r.Next())).OrderBy(t => t.Item2).Select((t, i) => $"{i + 1}. {t.Item1}")));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment