diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2025-10-03 13:30:14 +0200 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2025-10-03 13:30:14 +0200 |
| commit | c7e59864cad7f8bfa6ec484002bd78b4e463d1f8 (patch) | |
| tree | 59a7c2bab62f4fa31dc49f8cd45b58616ab5854f /exercises | |
| parent | c9218fbb22e38f4b6d387ba45b25c921ce9473ef (diff) | |
Fixed conversion from kg to tons
Diffstat (limited to 'exercises')
| -rw-r--r-- | exercises/060_floats.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/060_floats.zig b/exercises/060_floats.zig index b570518..ed63bb1 100644 --- a/exercises/060_floats.zig +++ b/exercises/060_floats.zig @@ -48,7 +48,7 @@ pub fn main() void { // By default, float values are formatted in scientific // notation. Try experimenting with '{d}' and '{d:.3}' to see // how decimal formatting works. - print("Shuttle liftoff weight: {d:.0} metric tons\n", .{shuttle_weight}); + print("Shuttle liftoff weight: {d:.0} metric tons\n", .{shuttle_weight / 1e3}); } // Floating further: |
