본문 바로가기

JAVA-BAEKJOON/3단계 반복문

[백준/03-08] 11022 A+B - 8

NO.11022 

 

 

풀이코드

import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int T = sc.nextInt();

        for(int i=1; i<=T; i++){
            int A = sc.nextInt();
            int B = sc.nextInt();

            System.out.println("Case #" + i + ": " + A + " + " + B + " = " + (A + B));
        }

        sc.close();
    }
}

 

📌 직전 문제랑 똑같고 출력 형식만 다름! 큰따옴표 많이 들어가서 헷깔리기 쉬움