← Back to archive

Stdle #18 · numbers · 2026-06-24

What does this C++ snippet output?

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

#include <iostream>
int main() {
int x = 20;
x >>= 1;
x -= 2;
std::cout << x << "\n";
}
Numbers
4 attempts left

Answer & explanation