땀두 블로그

[백준] 10998번 - AxB 본문

알고리즘/백준

[백준] 10998번 - AxB

땀두 2022. 3. 18. 10:06

 

문제

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

입력

첫째 줄에 A와 B가 주어진다. (0 < A, B < 10)

출력

첫째 줄에 A×B를 출력한다.

예제 입력 1

 
1 2

예제 출력 1

 
2

예제 입력 2

 
3 4

예제 출력 2

 
12
import java.util.Scanner;

public class p10998 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		System.out.println(a * b);
	}
}
 

곱셈연산을 하는 출력을 하면된다.

 

'알고리즘 > 백준' 카테고리의 다른 글

[백준] 2884번 - 알람시계  (0) 2022.03.18
[백준] 2577번 - 숫자의 개수  (0) 2022.03.18
[백준] 10869번 - 사칙연산  (0) 2022.03.18
[백준] 10171번 - 고양이  (0) 2022.03.18
[백준] 2439번 - 별찍기-2  (0) 2022.03.18
Comments