import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println(scanner.nextInt()-scanner.nextInt());
}
}
핵심
입력 값을 Scanner로 받는다.
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println(scanner.nextInt()-scanner.nextInt());
}
}
입력 값을 Scanner로 받는다.