Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <functional>
- using namespace std;
- int main() {
- function<double()> f = []() {
- double sum = 0;
- for (int i = 1; i <= 10; i++)
- sum += static_cast<double>(1) / (i * i + 1);
- return sum;
- };
- cout << f();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement