12345678910111213141516171819202122 |
- public class ShortCalculator {
-
- public short sum(short x, short y){
- return (short) (x + y);
- }
-
- public short difference(short x, short y){
- return (short) (x - y);
- }
-
- public short product(short x, short y){
- return (short) (x * y);
- }
-
- public short quotient(short x, short y){
- return (short) (x / y);
- }
-
- public short remainder(short x, short y){
- return (short) (x % y);
- }
- }
|