https://www.acmicpc.net/problem/10998
10998번: A×B
두 정수 A와 B를 입력받은 다음, A×B를 출력하는 프로그램을 작성하시오.
www.acmicpc.net
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
StringTokenizer st = new StringTokenizer(str, " ");
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
System.out.println(a * b);
}
}
https://goguming2.tistory.com/128
[백준] 1000번 : A+B - JAVA [자바]
https://www.acmicpc.net/problem/1000 1000번: A+B 두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오. www.acmicpc.net readLine() 과 read() 더보기 BufferedReader 의 경우 문자열을..
goguming2.tistory.com
'공부 > 알고리즘 공부' 카테고리의 다른 글
[백준] B10869번 : 사칙연산- JAVA [자바] (0) | 2022.06.16 |
---|---|
[백준] 1008번 : A/B - JAVA [자바] (0) | 2022.06.16 |
[백준] 1001번 : A-B - JAVA [자바] (0) | 2022.06.16 |
[백준] 1000번 : A+B - JAVA [자바] (0) | 2022.06.16 |
[백준] 10172번 : 개 - JAVA [자바] (0) | 2022.06.16 |