int i; double toplam=0; for (i = 1; i <= 1000; i++) { toplam += i; } toplam /= 1000; Console.WriteLine(toplam); Console.ReadKey();