목차
1. 문제

2. 맞춘코드
//[백준 Java] 10869: 사칙연산
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
public class bj10869{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine(), " ");
int num1 = Integer.parseInt(st.nextToken());
int num2 = Integer.parseInt(st.nextToken());
System.out.println(num1 + num2);
System.out.println(num1 - num2);
System.out.println(num1 * num2);
System.out.println(num1 / num2);
System.out.println(num1 % num2);
}
}
//결과출력
/*
7 3
10
4
21
2
1
계속하려면 아무 키나 누르십시오 . . .
*/
'💻 문제풀고 정리하기 + > 백준' 카테고리의 다른 글
| [백준 Java] 18108: 1998년생인 내가 태국에서는 2541년생?! (0) | 2023.08.26 |
|---|---|
| [백준 Java] 10926: ??! (0) | 2023.08.26 |
| [백준 Java] 1008: A/B (0) | 2023.08.26 |
| [백준 Java] 10998: A×B (0) | 2023.08.26 |
| [백준 Java] 1001: A - B (1) | 2023.08.26 |