티스토리 뷰
728x90
문제 링크
https://www.acmicpc.net/problem/1008
두 정수 A와 B를 받아 A/B를 출력하자.
절대/상대 오차를 10−9까지 허용하기 때문에 정확한 답을 위해 소수 10자리까지 출력한다.
정답 코드
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
double a, b; | |
int main(){ | |
cout <<fixed; | |
cout.precision(10); | |
cin >> a >> b; | |
cout << a / b; | |
} |
728x90
'알고리즘 > 문제 풀이' 카테고리의 다른 글
[2018 IUPC] 백준 15780 멀티탭 충분하니? (0) | 2018.06.29 |
---|---|
[BOJ] 백준 5214 환승 (3) | 2018.06.29 |
[BOJ] 백준 1005 ACM Craft (0) | 2018.06.28 |
[BOJ] 백준 1004 어린 왕자 (0) | 2018.06.28 |
[BOJ] 백준 1003 피보나치 함수 (0) | 2018.06.28 |