← Back to archive

Stdle #104 · math · 2026-09-18

What does this Zig snippet output?

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

const std = @import("std");
pub fn main() void {
const x: f64 = -3.7;
std.debug.print("{d}\n", .{@ceil(x)});
std.debug.print("{d}\n", .{@floor(x)});
}
Math
2 lines
4 attempts left

Answer & explanation