Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class P0303FloatingEquality {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- double num1 = Double.parseDouble(sc.nextLine());
- double num2 = Double.parseDouble(sc.nextLine());
- double eps = 0.000001;
- if (Math.abs(num1 - num2) > eps) {
- System.out.println("False");
- } else {
- System.out.println("True");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement