fork download
  1. using System;
  2. namespace ConsoleApplicationTest
  3. {
  4. class Program
  5. {
  6. public static void Main()
  7. {
  8. var d = -2M;
  9. while (d <= 2)
  10. {
  11. Console.WriteLine("(int){0}M == {1}", d, (int)d);
  12. d += 0.25M;
  13. }
  14. }
  15. }
  16. }
Success #stdin #stdout 0.04s 33928KB
stdin
Standard input is empty
stdout
(int)-2M == -2
(int)-1.75M == -1
(int)-1.50M == -1
(int)-1.25M == -1
(int)-1.00M == -1
(int)-0.75M == 0
(int)-0.50M == 0
(int)-0.25M == 0
(int)0.00M == 0
(int)0.25M == 0
(int)0.50M == 0
(int)0.75M == 0
(int)1.00M == 1
(int)1.25M == 1
(int)1.50M == 1
(int)1.75M == 1
(int)2.00M == 2