A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-169.c
1#include<stdio.h>
2intmain(void){
3intn=0;
4while(n-3)
5n++;
6printf("%d\n",n);
7return0;
8}
Conversions
Answer & explanation
Console output
3
Why
The while condition n - 3 is treated as true whenever it is nonzero. As n climbs from 0, n - 3 stays nonzero until n equals 3, at which point it becomes 0 (false) and the loop exits. Using arithmetic instead of an explicit comparison relies on C zero-versus-nonzero truthiness.