From 6dd9605a5e83d0539bcdefeca675f1070038ee68 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Wed, 21 Oct 2020 10:58:33 +0100 Subject: Work on Nadesh's comments in Verilog section --- data/accumulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/accumulator.c') diff --git a/data/accumulator.c b/data/accumulator.c index 007ae2b..aa7171a 100644 --- a/data/accumulator.c +++ b/data/accumulator.c @@ -1,9 +1,9 @@ int main() { int x[3] = {1, 2, 3}; - int sum = 0, incr = 1; + int sum = 0; for (int i = 0; i < 3; - i=i+incr) + i++) sum += x[i]; return sum; } -- cgit