1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| package ddd; import java.io.*; import java.io.BufferedInputStream; import java.math.*; import java.util.*; public class Main { public static void main( String[] args) { Scanner cin = new Scanner(System.in); int a,b; a = cin.nextInt(); b = cin.nextInt(); System.out.println(calculate.add(a, b)); System.out.println(calculate.sub(a, b)); System.out.println(mul(a,b)); } public static int mul(int a,int b) { return a * b; } } class calculate { public static int add(int a,int b) { return a + b; } public static int sub(int a,int b) { return a - b; } }
|