본문 바로가기

프로그래밍언어/알고리즘

백준 10950 A+B - 3 _JAVA

https://www.acmicpc.net/problem/10950

 

10950번: A+B - 3

두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오.

www.acmicpc.net

 

 



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 = 0 ; i < T ; i++) {
	    	int A = sc.nextInt();
		    int B = sc.nextInt();
	    	System.out.println(A+B);
	    }   

	    sc.close();
    }
    
}

'프로그래밍언어 > 알고리즘' 카테고리의 다른 글

백준 25304 영수증  (2) 2023.05.02
백준 8393 합_JAVA  (0) 2023.05.02
백준 2739번 구구단_JAVA  (0) 2023.05.02
백준 2480 주사위 세개_JAVA  (0) 2023.05.02
백준 2525번 : 오븐 시계 _ java  (0) 2023.05.02