Stdle #131 · modern · 2026-10-15
What does this C++ snippet output?
A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
#include <iostream>int main() { auto f = [](int n) { int sum = 0; for (int i = 1; i <= n; i++) sum += i; return sum; }; std::cout << f(4) << "\n";}Modern