19 lines
470 B
C++
19 lines
470 B
C++
|
#include <iostream>
|
||
|
#include <cmath>
|
||
|
|
||
|
int main() {
|
||
|
double vals[] = { 3.1415926029605323,
|
||
|
3.1415926506432696,
|
||
|
3.1415926528764806,
|
||
|
3.1415926535477534,
|
||
|
3.1415926535795631,
|
||
|
3.1415926535891852,
|
||
|
3.1415926535897571,
|
||
|
3.1415926535897851};
|
||
|
|
||
|
std::cout.precision(17);
|
||
|
for(double v : vals) {
|
||
|
std::cout << std::abs(3.14159265358979324 - v);
|
||
|
}
|
||
|
}
|