double e = 0.000000000001;

            
double d1 = 5.0;

            
double d2 = 5.1;

            
if (Math.Abs(d1 - d2) < e)
            {
                Console.WriteLine(
"same");
            }
            
else
            {
                Console.WriteLine(
"not same");
            }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2022-01-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-24
  • 2022-12-23
  • 2021-12-16
  • 2021-12-18
  • 2022-12-23
相关资源
相似解决方案