123456789101112131415161718192021222324252627282930 |
-
- /**
- *
- */
-
- import java.util.Scanner;
-
- public class Main
- {
- public static void main(String[] args){
- Scanner s = new Scanner(System.in);
-
- System.out.println("Welcome to this short calculator!");
- System.out.println("Please enter two numbers between 0 and 65535.");
- System.out.print("First number: ");
- short x = (short) s.nextInt();
- System.out.print("Second number: ");
- short y = (short) s.nextInt();
- ShortCalculator calc = new ShortCalculator(x, y);
-
- System.out.println("Sum = " + calc.getSum());
- System.out.println("Difference = " + calc.getDifference());
- System.out.println("Quotient = " + calc.getQuotient());
- System.out.println("Remainder = " + calc.getRemainder());
-
- System.out.println("Thank you for using this short calculator!");
-
- }
- }
|