import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println("a = "+a);
System.out.println("b = "+b);
}
}
scanner system.in을 통해서 입력을 받고 nextInt로 정수 타입 변환 후 system.out으로 출력
'코딩테스트 > lv0' 카테고리의 다른 글
[프로그래머스 코딩테스트] java Lv.0 산책 (PCCE 기출문제 5번) (0) | 2024.06.26 |
---|---|
[프로그래머스 코딩테스트] java Lv.0 가채점 (PCCE 기출문제 6번) (0) | 2024.06.26 |
[프로그래머스 코딩테스트] java Lv.0 가습기(PCCE 기출문제 7번) (0) | 2024.06.26 |
[프로그래머스 코딩테스트] java Lv.0 문자열 출력하기 (0) | 2024.06.26 |
[프로그래머스 코딩테스트] java Lv.0 문자열 반복해서 출력하 (0) | 2024.06.26 |