diff options
author | Martin Ashby <martin@ashbysoft.com> | 2022-12-10 23:02:40 +0000 |
---|---|---|
committer | Martin Ashby <martin@ashbysoft.com> | 2022-12-10 23:02:40 +0000 |
commit | 5257941f40554da3f8df074443a4c087dcff7004 (patch) | |
tree | b55af272f52f961f8fa02468861de2c255d8a9e2 /exercises/060_floats.zig | |
parent | 0e447c7956410a993614f9337d6219e017722443 (diff) | |
download | ziglings-main.tar.gz ziglings-main.tar.bz2 ziglings-main.tar.xz ziglings-main.zip |
25-60 completemain
Diffstat (limited to 'exercises/060_floats.zig')
-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 a223257..beac853 100644 --- a/exercises/060_floats.zig +++ b/exercises/060_floats.zig @@ -40,7 +40,7 @@ pub fn main() void { // // We'll convert this weight from tons to kilograms at a // conversion of 907.18kg to the ton. - var shuttle_weight: f16 = 907.18 * 2200; + var shuttle_weight: f32 = 907.18 * 2200.0; // By default, float values are formatted in scientific // notation. Try experimenting with '{d}' and '{d:.3}' to see |