← Back to archive

Stdle #78 · numbers · 2026-08-23

What does this C++ snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

#include <iostream>
int main() {
int a = 6;
int b = a > 3 ? a++ : --a;
std::cout << a << " " << b << "\n";
}
Numbers
4 attempts left

Answer & explanation