fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. var y = 1.0;
  8. var x = 1.0;
  9. var sw = new System.Diagnostics.Stopwatch();
  10. sw.Start();
  11. for (int i = 0; i < 10000; i++)
  12. {
  13. x *= y;
  14. x *= y;
  15. x *= y;
  16. x *= y;
  17. x *= y;
  18. x *= y;
  19. x *= y;
  20. x *= y;
  21. x *= y;
  22. x *= y;
  23. }
  24. sw.Stop();
  25. Console.WriteLine("Time = {0} ms", sw.Elapsed);
  26. }
  27. }
Success #stdin #stdout 0.04s 34752KB
stdin
Standard input is empty
stdout
Time = 00:00:00.0007265 ms