Compiler Explorer
DRANK
void fizzbuzz() { for (int i = 1; i <= 100; ++i) { inspect (std::pair(i%3, i%5)) { [0 , 0 ] => { std::cout << "fizzbuzz\n"; } [0 , __] => { std::cout << "fizz\n"; } [__, 0 ] => { std::cout << "buzz\n"; } [__, __] => { std::cout << i << '\n'; } }; } } int main() { fizzbuzz(); }