간단한 사칙연산 문제.
소수점 자리수만 조심하면 된다.
cout << fixed 는 소수점 자리수를 고정시키므로 쓰지 않는다.
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <iostream>
using namespace std;
int main(){
double a,b;
cin >> a >> b;
cout.precision(10);
cout << a/b << endl;
}
|
cs |
'Coding > 백준' 카테고리의 다른 글
| 2217번 로프 (0) | 2021.05.03 |
|---|---|
| 2839번 설탕 배달 (0) | 2021.04.26 |
| 2557번 Hello World (0) | 2021.03.13 |
| 14438번 수열과 쿼리 17 (0) | 2021.03.10 |
| 10868번 최솟값 (0) | 2021.03.10 |