Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.text.*;
- class Different {
- public static void main(String[] args) {
- DecimalFormat df = new DecimalFormat("#,#########");
- Scanner in = new Scanner(System.in);
- while(in.hasNext()) {
- double a = in.nextDouble();
- double b = in.nextDouble();
- double answer = (Math.abs(a - b));
- df.format(answer);
- System.out.println(answer);
- }
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement