wingman007

Acuracy

Sep 15th, 2025
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | Software | 0 0
  1. using System.ComponentModel.Design;
  2.  
  3. class Program
  4. {
  5.     static void Main()
  6.     {
  7.         const double eps = 0.000001;
  8.         Console.WriteLine("Please enter first number :");
  9.         double a=double.Parse(Console.ReadLine());
  10.         Console.WriteLine("Please enter second number :");
  11.         double b=double.Parse(Console.ReadLine());
  12.         if (Math.Abs(a - b) > eps)
  13.         {
  14.             Console.WriteLine($"Числата са равни с точност до {eps} ");
  15.  
  16.         }
  17.         else
  18.         {
  19.             Console.WriteLine($"Числата не са равни с точност до {eps} ");
  20.         }
  21.  
  22.     }
  23.    
  24. }
Advertisement
Add Comment
Please, Sign In to add comment