elesis's haunt
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();
sc.close();
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);
}
}
'백준~문풀 후 최적화 추가~ > 단계별로 풀어보기' 카테고리의 다른 글
2588 곱셈 (0) | 2021.04.14 |
---|---|
10430 나머지 (0) | 2021.04.14 |
1000 A+B, 1001 A-B 10998 A*B 1008 A/B (0) | 2021.04.10 |
10172 개 (0) | 2021.04.10 |
10171 고양이 (0) | 2021.04.10 |