← Back to archive

Stdle #39 · scope · 2026-07-15

What does this Rust snippet output?

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

fn main() {
let g = 85;
let letter = match g {
90..=100 => 'A',
s => { let s = s / 10; if s >= 8 { 'B' } else { 'C' } }
};
println!("{}", letter);
}
Scope
4 attempts left

Answer & explanation