mirror of
https://github.com/System-End/APCSA.git
synced 2026-04-19 19:55:17 +00:00
14 lines
411 B
Java
Executable file
14 lines
411 B
Java
Executable file
/* Lesson 8 Coding Activity Question 3 */
|
|
|
|
import java.util.Scanner;
|
|
|
|
public class U2_L8_Activity_Three {
|
|
|
|
public static void main(String[] args) {
|
|
Scanner scan = new Scanner(System.in);
|
|
System.out.println("Enter two doubles:");
|
|
Double d1 = scan.nextDouble();
|
|
Double d2 = scan.nextDouble();
|
|
System.out.println("Difference: " + Math.abs(Math.round(d1 - d2)));
|
|
}
|
|
}
|