/*public class Main { public static void main(String[] args) { System.out.println("Hello World"); } } */ /*public class Main { public static void main(String args[]) { int x=10; int y=25; int z=x+y; System.out.println("Sum = " + z); } } */ /*import java.util.Scanner; public class Main { public static void main(String[] args) { System.out.println("The Sum of the values is " + adder()); } public static int adder () { Scanner scanner = new Scanner (System.in); System.out.println("Value of X = "); int x; x = scanner.nextInt(); System.out.println("Value of Y = "); int y; y = scanner.nextInt(); int z; z = x + y; return z; } } */ /*import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner (System.in); System.out.println("Value of X = "); int x = scanner.nextInt(); System.out.println("Value of Y = "); double y = scanner.nextDouble(); double sum = adder(x,y); System.out.println("The Sum of the values is " + sum); } public static double adder (int x, double y) { double sum = x + y; return sum; } } */ import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner (System.in); System.out.println("Value of X = "); double x = scanner.nextDouble(); System.out.println("Value of Y = "); int y = scanner.nextInt(); System.out.println("The answer is " + adder(x,y)); System.out.println("The answer is " + adder(y,x)); } public static double adder (int y, double x) { double adder = y + x; return adder; } public static double adder (double x, int y) { if (x >= 0) { x = x * -1 ; } if (y >= 0) { y = y * -1 ; } double adder = x + y; return adder; } }