12345678910111213141516171819202122232425262728293031 |
-
-
- public class ShortCalculator {
-
- public short sum(short x, short y){
-
- return (short) (x + y);
- }
- public short subtract(short x, short y){
-
- return (short) (x - y);
-
- }
-
- public short multiply(short x, short y){
-
- return (short) (x * y);
- }
- public short divide(short x, short y){
-
- return (short) (x / y);
-
- }
-
- public short mod(short x, short y){
-
- return (short) (x % y);
- }
- }
-
|