← Back to archive

Stdle #56 · numbers · 2026-08-01

What does this C++ snippet output?

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

#include <iostream>
int main() {
int a = 1, b = 2, c = 3;
int max = a > b ? (a > c ? a : c) : (b > c ? b : c);
std::cout << max << "\n";
}
Numbers
4 attempts left

Answer & explanation