Something went wrong. Try again.
A Tour of C++ for experienced programmers, as if C++26 is the only version that ever existed.
Something went wrong. Try again.
123456789101112131415#include <iostream>#include <ranges>
int main() { for (int i : std::views::iota(1, 21)) { if (i % 15 == 0) std::cout << "fizzbuzz"; else if (i % 3 == 0) std::cout << "fizz"; else if (i % 5 == 0) std::cout << "buzz"; else std::cout << i; if (i != 20) std::cout << ' '; } std::cout << '\n'; return 0;}