Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- namespace FloatingEquality
- {
- class Program
- {
- static void Main(string[] args)
- {
- double a = double.Parse(Console.ReadLine());
- double b = double.Parse(Console.ReadLine());
- if ( Math.Abs(a - b) <= 0.000001)
- {
- Console.WriteLine("True");
- }
- else
- {
- Console.WriteLine("False");
- }
- }
- }
- }
- Тарикатско решение:)
- using System;
- namespace FloatingEquality
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine(Math.Abs(double.Parse(Console.ReadLine()) - double.Parse(Console.ReadLine())) <= 0.000001);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement