fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. double a = 0.00004;
  8. Int32 castToInt = (Int32)(1.0/a);
  9. Int32 convertToInt = Convert.ToInt32(1.0/a);
  10.  
  11. Console.WriteLine("{0} {1:F9} {2:F9}", castToInt == convertToInt,
  12. castToInt,
  13. convertToInt);
  14.  
  15. Console.WriteLine((((int)(1.0/(1.0/25000))) == 24999));
  16.  
  17. double d = 1.0 / 0.00004;
  18. Console.WriteLine("{0:F9}", d);
  19. }
  20. }
Success #stdin #stdout 0.03s 33944KB
stdin
Standard input is empty
stdout
False 24999.000000000 25000.000000000
True
25000.000000000