728x90
1938. ์์ฃผ ๊ฐ๋จํ ๊ณ์ฐ๊ธฐ - D1
๋ ์ซ์๋ฅผ ๋ฐ์ ์ฌ์น์ฐ์ฐ(+, -, *, /)์ ์์๋๋ก ํ๊ณ ์ถ๋ ฅํ๋ ๋ฌธ์ ์ด๋ค.
num1, num2๋ฅผ ์ ๋ ฅ๋ฐ๊ณ +, -, *, / ์์๋๋ก ์ฐ์ฐํ ๊ฐ์ ์ถ๋ ฅํ๋๋ก ํ๋ค.
import java.util.Scanner;
import java.io.FileInputStream;
class Solution
{
public static void main(String args[]) throws Exception
{
Scanner sc = new Scanner(System.in);
int num1 = sc.nextInt();
int num2 = sc.nextInt();
System.out.println(num1+num2);
System.out.println(num1-num2);
System.out.println(num1*num2);
System.out.println(num1/num2);
}
}
๋ ๐ง
'SWEA' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[SWEA] 1936. 1๋1 ๊ฐ์๋ฐ์๋ณด (0) | 2022.05.20 |
---|---|
[SWEA] 1933. ๊ฐ๋จํ N์ ์ฝ์ (0) | 2022.05.19 |
[SWEA] 2025. N์ค ๋ง์ (0) | 2022.05.18 |
[SWEA] 2027. ๋๊ฐ์ ์ถ๋ ฅํ๊ธฐ (0) | 2022.05.18 |
[SWEA] 2043. ์๋์ ๋น๋ฐ๋ฒํธ (0) | 2022.05.18 |
๋๊ธ