import java.util.Scanner; import java.lang.Math; public class ShortCalculator { public static Short add(short number1,short number2){ Scanner scanner = new Scanner(System.in); System.out.println("Enter the first number"); number1 = scanner.nextShort(); System.out.println("Enter second number"); number2 = scanner.nextShort(); short add = (short)(number1 + number2); System.out.println(add); return add; } public static Short subtract(short number1,short number2){ Scanner scanner = new Scanner(System.in); System.out.println("Enter the first number"); number1 = scanner.nextShort(); System.out.println("Enter second number"); number2 = scanner.nextShort(); short subtract = (short)(number1 - number2); System.out.println(subtract); return subtract; } public static Short multiply(short number1,short number2){ Scanner scanner = new Scanner(System.in); System.out.println("Enter the first number"); number1 = scanner.nextShort(); System.out.println("Enter second number"); number2 = scanner.nextShort(); short multiply = (short)(number1 * number2); System.out.println(multiply); return multiply; } public static Short divide(short number1,short number2){ Scanner scanner = new Scanner(System.in); System.out.println("Enter the first number"); number1 = scanner.nextShort(); System.out.println("Enter second number"); number2 = scanner.nextShort(); short divide = (short)(number1/number2); System.out.println(divide); return divide; } }