diff --git a/exercises/096_memory_allocation.zig b/exercises/096_memory_allocation.zig index 8e348be..7538ba4 100644 --- a/exercises/096_memory_allocation.zig +++ b/exercises/096_memory_allocation.zig @@ -45,7 +45,7 @@ fn runningAverage(arr: []const f64, avg: []f64) void { for (0.., arr) |index, val| { sum += val; - avg[index] = sum / @intToFloat(f64, index + 1); + avg[index] = sum / @floatFromInt(f64, index + 1); } }