Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Program {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- System.out.print("a: ");
- double a = scan.nextDouble();
- System.out.print("b: ");
- double b = scan.nextDouble();
- double result = a + b;
- System.out.println("Result = " + result);
- }
- }
Add Comment
Please, Sign In to add comment