Advertisement
Guest User

03. Floating Equality

a guest
Dec 3rd, 2022
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.30 KB | None | 0 0
  1. using System;
  2. internal class Program
  3.     {
  4.         static void Main()
  5.         {
  6.  
  7.             double a = double.Parse(Console.ReadLine());
  8.             double b = double.Parse(Console.ReadLine());
  9.  
  10.             bool ch = Math.Abs(a - b) < 0.000001;
  11.  
  12.             Console.WriteLine(ch);
  13.         }
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement