Mode:
Duration:
1
2
3
4
5
6
7
8
9
const std = @import("std");
fn cToF(c: f64) f64 { return c * 9.0 / 5.0 + 32.0; }
fn fToC(f: f64) f64 { return (f - 32.0) * 5.0 / 9.0; }
pub fn main() void {
std.debug.print("25°C = {f}°F\n", .{cToF(25.0)});
std.debug.print("77°F = {f}°C\n", .{fToC(77.0)});
}Coding works best on desktop or with an external keyboard.