GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — learnmoderncpp-tutorial/modules/10-lambda3.cpp at main · cpp-tutor/learnmoderncpp-tutorial Expand file tree/ Copy path10-lambda3.cppMore file actions 17 lines (14 loc) · 389 Bytes / Copy path10-lambda3.cppFile metadata and controls17 lines (14 loc) · 389 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 // 10-lambda3.cpp : lambda function which calculates average of two values import std; using namespace std; int main() { auto l = [](int a, int b) { cout << "Calculating average...\n"; return (a + b) / 2; }; cout << "Please enter two integers:\n"; int x{}, y{}; cin >> x >> y; auto avg = l(x, y); cout << "The average is: " << avg << '\n'; } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |