using System; using System.Diagnostics; namespace ConsoleApplication6 { internal class Program { private static void Main() { Stopwatch s=new Stopwatch(); int iters = 100; double a = 0; s.Start(); for (int q = 0; q < iters; q++) for (int i = 0; i < 100000; i++) if (i%2 == 0) a += Math.Sin(i); else a -= Math.Sin(i); s.Stop(); Console.WriteLine("Result: {0}, time: {1}",a,(double)s.ElapsedMilliseconds/1000); } } }