A/B
두 정수 A와 B를 입력받은 다음, A/B를 출력하는 프로그램을 작성하시오.
첫째 줄에 A와 B가 주어진다. (0 < A, B < 10)
첫째 줄에 A/B를 출력한다. 절대/상대 오차는 10-9 까지 허용한다.
1 2 3 4 5 6 7 8 9 | #include <iostream> #include <iomanip> using namespace std; int main(void){ double a, b; cin >> a >> b; cout << fixed << setprecision(9) << a/b << endl; } | cs |
# Keyword
<iomanip> library
fixed + setprecision
'Study > Algorithm' 카테고리의 다른 글
[백준][Op] 나머지 연산 (0) | 2019.01.29 |
---|---|
[백준][Op] 사칙연산 (0) | 2019.01.29 |
[백준][Op] AxB (0) | 2019.01.29 |
[백준][I/O] 그대로 출력하기2 (0) | 2019.01.29 |
[백준][I/O] 그대로 출력하기 (0) | 2019.01.29 |