using System.Collections.Generic;
public static void Main()
List<double> duplList = new List<double> {1.1, 2.2, 2.2, 3.3, 4.4, 5.5, 5.5, 6.6, 7.7};
for (int i = 0; i < duplList.Count; i++)
Console.WriteLine("DuplList List Items indices: " + i + " DuplList List Items: " + duplList[i]);
for (int i = 0 ; i < duplList.Count -1 ; i++)
double st1 = duplList[i+1];
double nd2 = duplList[i];
for (int i = 0; i < duplList.Count; i++)
Console.WriteLine("DeDuplList List Items indices: " + i + " DeDuplList List Items: " + duplList[i]);
List<double> avgshortList = new List<double>();
for (int i = duplList.Count - 6; i < duplList.Count; i++)
avgshortList.Add(duplList[i]);
double avg = avgshortList.Count > 0 ?
Queryable.Average(avgshortList.AsQueryable())
Console.WriteLine("Latest 6 List's items Average number \n ((7.7 + 6.6 + 5.5 + 4.4 + 3.3 + 2.2) / 6) = "