본문 바로가기

Coding Test/백준

[백준/자바] 10869 - 사칙연산

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();
        System.out.println(A+B);
        System.out.println(A-B);
        System.out.println(A*B);
        System.out.println(A/B);
        System.out.println(A%B);
        sc.close();
    }
}

'Coding Test > 백준' 카테고리의 다른 글

[백준/자바] 1546 - 평균  (0) 2023.05.04
[백준/자바] 11720 - 숫자의 합  (0) 2023.05.04
[백준/자바] 1008 - A/B  (0) 2023.02.28
[백준/자바] 10998 - A×B  (0) 2023.02.28
[백준/자바] 1001 - A-B  (0) 2023.02.28