fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. decimal a = 9;
  8. decimal b = 1.23456789M;
  9. decimal c = 10.23456789M;
  10. decimal d = c-b;
  11. Console.WriteLine("Values are the same: {0}", a == d);
  12. Console.WriteLine(a.ToString("G"));
  13. Console.WriteLine(d.ToString("G"));
  14. }
  15. }
Success #stdin #stdout 0s 29664KB
stdin
Standard input is empty
stdout
Values are the same: True
9
9.00000000