Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ComparingFloats
- {
- class MainClass
- {
- public static void Main(string[] args)
- {
- double a = double.Parse(Console.ReadLine());
- double b = double.Parse(Console.ReadLine());
- double eps = 0.000001;
- if (Math.Abs(a - b) < eps)
- {
- Console.WriteLine("True");
- }
- else
- {
- Console.WriteLine("False");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement