728x90

백준 #백준 알고리즘 #백준 자바 #백준 10952번 #자바 조건문 #자바 #알고리즘

Progamming/BAEK JOON > 백준의 알고리즘

[백준] 10952번 : A+B - 5 - JAVA

https://www.acmicpc.net/problem/10952 10952번: A+B - 5 두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오. www.acmicpc.net 문제 분석 입력 개수가 정해져 있지 않음. A와 B가 주어짐. 입력 마지막줄에 0 이 두 개가 들어오면 종료 풀이 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(true){// true = 무한루프를 이용해 // 특정 조건 만족시 무한루프 종료 int a = sc.nextInt(); int b = sc.nextInt(); ..

728x90
코딩밤
'백준 #백준 알고리즘 #백준 자바 #백준 10952번 #자바 조건문 #자바 #알고리즘' 태그의 글 목록