(F. 문제 1000: 두 개의 정수를 받아 A+B를 출력하는 프로그램)
스캐너 문제 해결
import java.util.Scanner;
public class Main {
public static void main(String() args) {
//scanner 객체 생성
//System.in: 사용자로부터 키 입력 받음
Scanner sc = new Scanner(System.in);
//입력받은 값을 int형으로 반환함
int A = sc.nextInt();
int B = sc.nextInt();
//A+B한 값을 출력
System.out.println(A + B);
}
}