Written by
java-style
on
on
[10952] A+B 출력하기 (while 활용)
[10952] A+B 출력하기 (while 활용)
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); while(a!=0 || b!=0) { System.out.println(a+b); int a = sc.nextInt(); int b = sc.nextInt(); } } }
공유하기 글 요소 저작자표시
from http://javachip-dev.tistory.com/10 by ccl(A) rewrite - 2021-10-29 17:27:25