BAEKJOON

JAVA -백준(BAEKJOON)(BAEKJOON) 1000번 문제 답

dev-include 2017. 7. 25. 11:14

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


import java.util.Scanner;


public class Main {

public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    

    int a = sc.nextInt();

    int b = sc.nextInt();

    

    if(0 < a && b < 10){

    int c = a + b;

        System.out.println(c);

    }

}

}