From 3a3e34ec42f514e6736afb33ec470114a8b63acc Mon Sep 17 00:00:00 2001 From: Ricardo Chiriboga <115743728+rachirib@users.noreply.github.com> Date: Sun, 23 Jun 2024 06:02:44 +1000 Subject: [PATCH] concept/loops: fix typo (#886) i is the counter for the module of 2, instead of n. --- concepts/loops/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/concepts/loops/introduction.md b/concepts/loops/introduction.md index 690d8e88f..d6793636f 100644 --- a/concepts/loops/introduction.md +++ b/concepts/loops/introduction.md @@ -84,7 +84,7 @@ In contrast, the keyword `continue` only stops the execution of the current iter ```cpp int equal_sum{0}; for (int i{1}; i < 7; ++i) { - if (n%2 == 1) { + if (i%2 == 1) { continue; } equal_sum += i;