Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. static void Main()
  2. {
  3. Console.Write("Enter number a:");
  4. double a = double.Parse(Console.ReadLine());
  5. Console.Write("Enter number b:");
  6. double b = double.Parse(Console.ReadLine());
  7. double eps = 0.000001;
  8.  
  9. if (a > b);
  10. {
  11. if (a - b> eps);
  12. {
  13. Console.WriteLine("The two number are not equal with presicion 0.000001 ");
  14. areEqual = false
  15. }
  16. else
  17. {
  18. Console.WriteLine("The two number are equal with presicion 0.000001 ");
  19. }
  20.  
  21. }
  22. else if (b > a);
  23. {
  24. if (a - b> eps);
  25. {
  26. Console.WriteLine("The two number are not equal with presicion 0.000001 ");
  27.  
  28. }
  29.  
  30. }
  31.  
  32.  
  33.  
  34.  
  35.  
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement