From a5a36337e88a15befbb814cdd14a4801e44f6673 Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Mon, 26 Jun 2023 23:43:39 +0200 Subject: Revised exercises due to the changes of Zig version 0.11.0-dev.3853 --- exercises/096_memory_allocation.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'exercises/096_memory_allocation.zig') diff --git a/exercises/096_memory_allocation.zig b/exercises/096_memory_allocation.zig index 7538ba4..c8d7bf6 100644 --- a/exercises/096_memory_allocation.zig +++ b/exercises/096_memory_allocation.zig @@ -45,7 +45,8 @@ fn runningAverage(arr: []const f64, avg: []f64) void { for (0.., arr) |index, val| { sum += val; - avg[index] = sum / @floatFromInt(f64, index + 1); + const f_index: f64 = @floatFromInt(index + 1); + avg[index] = sum / f_index; } } -- cgit v1.2.3-70-g09d2