Write a program that reads two double values and prints the difference between the second and the first one.
Floating-point types and operations
Difference between two doubles
Report a typo
Sample Input 1:
18.4
-5.0Sample Output 1:
-23.4Write a program in Java 17
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// put your code here
}
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.