@ForEveR
В астрале
7991 / 4750 / 321
Регистрация: 24.06.2010
Сообщений: 10,547
|
16.08.2012, 11:45
|
|
C++ | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
| #include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
int main()
{
std::vector<int> v = {5,3,4,5,6,2,1,3,46,8,6,1212};
std::for_each(v.begin(), v.end(), [](const int v)
{
std::cout << std::fixed << std::setprecision(4) << sqrt(static_cast<double>(v)) << std::endl;
});
} |
|
http://liveworkspace.org/code/1dc19025529ad46b8a9320bd253c3875
0
|