Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int n = 20;
- List<int> serie = Enumerable.Range(1, 100).ToList();
- List<int> nesimosElementos = new List<int>();
- Enumerable.Range(0, serie.Count() / n)
- .ToList()
- .ForEach(
- indice =>
- {
- nesimosElementos.Add(serie.Skip(indice * n).First());
- }
- );
- nesimosElementos.Dump("20-ésimos Elementos de la Serie 1-100");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement