fork(2) download
  1. using System;
  2.  
  3.  
  4. namespace Enum
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. double[] array = new[] { 1.0, 1.1, 1.2, 1.25, 1.3, 1.4, 1.5, 1.55, 1.6, 1.7, 1.75, 1.8, 1.9 };
  11. foreach (double item in array)
  12. {
  13. double d = item * 4;
  14. double i = Math.Round(d, MidpointRounding.AwayFromZero);
  15. Console.WriteLine(i / 4);
  16. }
  17. }
  18. }
  19. }
Success #stdin #stdout 0.03s 33896KB
stdin
Standard input is empty
stdout
1
1
1.25
1.25
1.25
1.5
1.5
1.5
1.5
1.75
1.75
1.75
2