package com.company;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// write your code here
String s1 = getInput("\n Enter Value 1: ");
String s2 = getInput("\n Enter Value 1: ");
double result = addValues(s1, s2);
System.out.println("\n The answer is: " + result);
}
static String getInput(String prompt) {
System.out.print(prompt);
Scanner sc = new Scanner(System.in);
return sc.nextLine();
}
static double addValues(String s1, String s2) {
double d1 = Double.parseDouble(s1);
double d2 = Double.parseDouble(s2);
double result = d1 + d2;
return result;
}
}