import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int number1 = scanner.nextInt();
int number2 = scanner.nextInt();
System.out.println(add(number1, number2));
System.out.println(subtraction(number1, number2));
System.out.println(multi(number1, number2));
System.out.println(division(number1, number2));
System.out.println(mod(number1, number2));
}
public static int add(int number1, int number2) {
return number1+ number2;
}
public static int subtraction(int number1, int number2) {
return number1- number2;
}
public static int multi(int number1, int number2) {
return number1* number2;
}
public static int division(int number1, int number2) {
return number1/ number2;
}
public static int mod(int number1, int number2) {
return number1% number2;
}
}
핵심
나누기 / 와 나머지 % 구분